0

我在 Xcode 版本 7 中开发了一个应用程序,现在我想在 Xcode 版本 8.2.1 中运行相同的应用程序。我需要重新安装我在以前版本的 Xcode 中包含的 pod 文件还是有任何程序在新版本的 Xcode 中运行它之前我需要遵循吗?

播客文件:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'test' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for test

  target 'testTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'testUITests' do
    inherit! :search_paths
    # Pods for testing
  end
 pod 'AZSClient'
  pod 'CardIO'
  pod 'Google/Analytics'
  pod 'OpenTok'
  pod 'THCalendarDatePicker', '~> 1.2.6'

end
4

6 回答 6

0

无需再次安装 pod。你只需要做......

删除“其他链接器标志”列表中的 -lPods-(someCocoaPod) 行,但仅当 $(inherited) 位于顶部时。起初我不确定,但令人放心的迹象是,当我离开编辑模式(继承)时,我仍然看到对我的 cocoapods 的引用。我在 debug 和 release 中进行了测试,这两个都给了我错误,问题立即解决了

于 2017-02-15T05:37:15.360 回答
0

您可以尝试运行“pod install”吗?重新安装 pod 文件应该不会有任何损失。

于 2017-02-15T04:04:43.850 回答
0

尝试在 ~/.cocoapods/repos 中手动添加它或通过 pod repo add..

于 2017-02-15T07:15:31.540 回答
0

如果您新安装了 Xcode 8.2.1,那么您可能需要使用https://www.cocoanetics.com/2013/11/updating-cocoapods/在 Mac 上更新 CocoaPods

于 2017-02-15T07:10:41.060 回答
0

谢谢大家,最后通过更新 rvm、ruby 和 openssl 以及升级 git 解决了这个问题:

吊舱安装:

参考:

如何在 Mac OSX Yosemite 中将 Ruby 版本 2.0.0 更新到最新版本?

rvm 稳定下来

酿造更新

冲泡医生

冲泡安装openssl

rvm install ruby​​-2.3.3 (或任何版本)

rvm 使用(此处为 ruby​​ 版本)即 rvm 使用 ruby​​-2.3.3

//rvm gemset create NAME ie rvm gemset create rails41 //gem install rails -v 4.1

rvm list(ruby) rvm –default use 2.3.3(设为默认)

rvm 重新安装 2.3.3 --with-openssl-dir=/usr/local/opt/openssl

sudo gem 安装 cocoapods

吊舱初始化

更改 pod 文件并保存(添加依赖项)à 仅在崇高文本中编辑

吊舱安装

于 2017-02-15T12:21:35.600 回答
0

您可以访问https://guides.cocoapods.org/using/pod-install-vs-update.html

我已经在一个演示项目中安装了你的依赖项,它工作正常并成功构建,

pod install如果您是第一次安装,pod update如果您正在添加新框架或在较新版本中运行,只需运行即可。

在此处输入图像描述

我认为你必须这样做,

转到 ~/.cocoapods/repos 并运行 git clone https://github.com/CocoaPods/Specs.git master

或者,如果两者都不起作用,请访问,

无法使用 url 添加源

于 2017-02-15T04:43:20.323 回答