集成(目标 C)Xcode 7.2 iOS 9.2:
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoa pods (automatic pods version (0.39))
$ export PATH=$PATH:$HOME/Software/ruby/bin
$ cd/ to project folder
$ pod init
$ open -a Xcode Podfile
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'ProjectName' do
pod 'AFNetworking', '~> 2.0.3'
end
target 'ProjectNameTests' do
end
$ pod install
Xcode 给出错误“找不到-lAFNetworking 的库”
在谷歌周围搜索:尝试过的东西:
从目标>构建设置>其他链接器标志中删除了所有内容,除了$(继承),编译但不走运
来自( https://github.com/CocoaPods/cocoapods-deintegrate )的 Deintegrated pods 插件再次安装编译但不走运
尝试使用标题搜索路径和框架搜索路径进行实验,但不走运。