Xcode 8 Pod 更新问题 - 由于主要版本更新而重新创建 CocoaPods
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37851132/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 8 Pod update issue - Re-creating CocoaPods due to major version update
提问by Puvanarajan
I installed the latest version Xcode 8 beta. My Project was developed by Swift 2.0. So I convert the project to Swift 3. So I update the pod file. But When I update the pod file I am getting error.
我安装了最新版本的 Xcode 8 beta。我的项目是由 Swift 2.0 开发的。所以我将项目转换为 Swift 3。所以我更新了 pod 文件。但是当我更新 pod 文件时,出现错误。
Pod file:
豆荚文件:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.4'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod "SwiftSpinner"
#pod "AFNetworking", "2.5.0"
pod 'HanekeSwift'
Error message:
错误信息:
Re-creating CocoaPods due to major version update. Analyzing dependencies [!] The dependency
Alamofire (~> 3.4)
is not used in any concrete target. The dependencySwiftyJSON (from
https://github.com/SwiftyJSON/SwiftyJSON.git)
is not used in any concrete target. The dependencySwiftSpinner
is not used in any concrete target. The dependencyHanekeSwift
is not used in any concrete target.
由于主要版本更新,重新创建 CocoaPods。分析依赖关系 [!] 该依赖关系
Alamofire (~> 3.4)
未在任何具体目标中使用。依赖SwiftyJSON (from
https://github.com/SwiftyJSON/SwiftyJSON.git)
没有在任何具体目标中使用。该依赖项SwiftSpinner
未用于任何具体目标。该依赖项HanekeSwift
未用于任何具体目标。
NOTE: I already update the cocoapods using this command
注意:我已经使用这个命令更新了 cocoapods
sudo gem install cocoapods
回答by Sohil R. Memon
To solve this issue delete the current pod file and create one using the terminal. Follow the below steps:
要解决此问题,请删除当前 pod 文件并使用终端创建一个。请按照以下步骤操作:
- Open Terminal
- Navigate to your Project Path
- Type
pod init
in terminal to create new pod file - Open the newly created pod file and write the pod line which you want to install after
target "TargetName" do
and beforeend
. - Then type
pod install
in the terminal
- 打开终端
- 导航到您的项目路径
- 键入
pod init
在终端创造新的吊舱文件 - 打开新创建的 pod 文件,在 后
target "TargetName" do
和之前写入要安装的 pod 行end
。 - 然后
pod install
在终端输入
Hope this helps!
希望这可以帮助!