我正在尝试将CocoaPods添加到具有多个目标的现有项目中.我的podfile看起来像
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' link_with 'Target 1', 'Target 2', 'Target 2', 'Target 2' pod 'AFNetworking', '~> 2.0'
我正在尝试使用具有以下命令的脚本进行构建
xcodebuild archive -project "${PROJ_NAME}.xcodeproj" -scheme ${SCHEME_NAME} -configuration ${CONFIGURATION}
当我编译时,我收到一个错误:
ld: library not found for -lPods-AFNetworking
这很奇怪,因为目标使用Xcode中的Product> Archive菜单进行归档.
看起来你没有在xcworkspace
这里构建生成的文件.切换到你的命令,你应该没事.