问题描述
我一直在尝试使用CocoaPods在iOS 9上安装和使用AlamoFire和SwiftyJSON。最新版本一直安装,并且与iOS 9.0不兼容。
I have been trying to install and use AlamoFire and SwiftyJSON on iOS 9 using CocoaPods. The latest version keeps getting installed and it is not compatible with iOS 9.0.
我的PodFile如下所示:
My PodFile looks like this:
platform :ios, '9.0'
use_frameworks!
target 'Kitchology' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'AlamofireImage'
end
我尝试将它们注释掉并进行pod安装以将其删除,然后将它们放回去并做另一个Pod安装。每次安装最新版本。
I tried commenting them out and doing a pod install to remove them, then put them back in and do another pod install. Every time the latest is installed.
对于所有版本的项目,我确实都将项目本身设置为iOS 9.0,而不是iOS 9.3。 $ b
I do have the project itself set to iOS 9.0 and NOT iOS 9.3 for the project build on all versions.
推荐答案
弄清楚了这一点。我通过注释掉豆荚并运行 pod update
来删除了豆荚。然后我们删除了工作区。接下来是解决方案的主要部分-我们删除了派生数据文件夹中的所有内容。您可以在Xcode-> Preferences Locations中找到此位置。尽管清除应该删除此数据,但显然不会删除。
Figured this one out. I deleted the pods by commenting them out and running pod update
. Then we deleted the workspace. Then comes the main part of the solution - we deleted everything in the derived data folder. You can find this location in Xcode->Preferences Locations. Although a clean should delete this data, it obviously did not.
现在,我们再次重新创建容器。进行 pod初始化
,将Pod重新添加到Podfile中,并进行 pod安装
。打开工作区,一切都很好。
Now we recreate the pods again. Do a pod init
, add the pods back into the Podfile and do a pod install
. Open the workspace and everything was then good.
这是Xcode中缓存数据的问题。
This was a problem with cached data in Xcode.
这篇关于iOS 9.0上的AlamoFire + SwiftyJSON的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!