Xcode8.0下cocopads升级XMPPFramework

前两天xcode7.2写的xmpp-demo,今天用xcode8.0一编译,不能用了。
在网上各种搜。终于弄好了,总结几点。

1.用cocopads 1.1.0.beta.2才能装正确的XMPPFramework。
2.XMPPFramework的描述有变化

1.pod --version可以看你的版本。
cocopads升级方法

  sudo gem install cocoapods --pre -n /usr/local/bin cocoa pods

2.pod中的文件描述有变化

use_frameworks!
target 'XMPP-demo' do

    pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'

end

如果你在第2步之前遇到

Resolving dependencies of `Podfile`
[!] Unable to satisfy the following requirements:
- `KissXML (~> 5.1.2)` required by `XMPPFramework/Core (3.7.0)`
None of your spec sources contain a spec satisfying the dependency: `KissXML (~> 5.1.2)`.
You have either: * out-of-date source repos which you can update with `pod repo update`. * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

用以下代码即可,具体作用不明

pod repo update

如果你还没有装成功XMPPFramework,欢迎和我联系.我真的懒得回退cocopads版本去求真了.我主要的错误是pod repo update这一步卡了很久.

你可能感兴趣的:(Xcode8.0下cocopads升级XMPPFramework)