【问题标题】:How to Change Existing Repository Url in Podfile , Update all pods into New Repository如何更改 Podfile 中的现有存储库 URL,将所有 pod 更新到新存储库
【发布时间】:2020-03-06 09:56:35
【问题描述】:

在更新 pod 文件时,它使用现有存储库询问大桶密码,但我没有密码(供应商大桶存储库),我想更改存储库 url。你能分享我如何更改网址吗?

 platform :ios, '10.0'
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
target 'Gaadi Bazaar' do

source 'vendor repository url.git' 
#source 'own repository url.git'
source 'https://github.com/CocoaPods/Specs.git'
  # Pods for GaadiBazaar
      pod 'IXKit', '~> 0.1.3'
      pod 'IXNetwork', '~> 0.1.2'
      pod 'TTRangeSlider'
      pod 'TPKeyboardAvoiding'
      pod 'SideMenu', '~> 4.0.0'
      pod 'OneSignal', '>= 2.6.2', '< 3.0'
      pod 'LocaleManager'
      pod 'Fabric'
      pod 'Crashlytics'
      pod 'YouTubePlayer'

end
target 'OneSignalNotificationServiceExtension' do
    pod 'OneSignal', '>= 2.6.2', '< 3.0'
end

#post_install do |installer|
#    installer.pods_project.build_configurations.each do |config|
#        config.build_settings.delete('CODE_SIGNING_ALLOWED')
#        config.build_settings.delete('CODE_SIGNING_REQUIRED')
#    end
#end
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.new_shell_script_build_phase.shell_script = "mkdir -p $PODS_CONFIGURATION_BUILD_DIR/#{target.name}"
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4'
            config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR'
        end
    end
end

【问题讨论】:

  • 如果您发现任何有用的答案,那么您可以点击接受。只需 5 秒,但这是欣赏的好方法

标签: ios xcode cocoapods podfile podfile-lock


【解决方案1】:

试试这个:

pod 'SomePod', :git => 'https://github.com/someUser/SomePod'

【讨论】:

    【解决方案2】:

    要更改存储库网址,您可以按照以下方式进行操作

    要使用存储库的 ma​​ster 分支

    pod 'AKPickerView-Swift', :git => 'https://github.com/mrugeshtank/AKPickerView-Swift.git'
    

    要使用存储库的不同分支

    pod 'AKPickerView-Swift', :git => 'https://github.com/mrugeshtank/AKPickerView-Swift.git', :branch => 'someBranchName'
    

    要使用存储库的标签

    pod 'AKPickerView-Swift', :git => 'https://github.com/mrugeshtank/AKPickerView-Swift.git', :tag => '2.0.0'
    

    或具体的提交

    pod 'AKPickerView-Swift', :git => 'https://github.com/mrugeshtank/AKPickerView-Swift.git', :commit => '5edfe3a'
    


    你可以找到更多关于 podfile 的文档here

    【讨论】:

      猜你喜欢
      • 2021-06-14
      • 2018-10-17
      • 2018-02-27
      • 2022-11-03
      • 2016-02-21
      • 2013-03-19
      • 1970-01-01
      • 1970-01-01
      • 2012-09-23
      相关资源
      最近更新 更多