【问题标题】:xcodebuild not working with pods and multiple targetsxcodebuild 不适用于 pod 和多个目标
【发布时间】:2015-02-16 14:22:09
【问题描述】:

我正在尝试将 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。

【问题讨论】:

    标签: xcode cocoapods xcodebuild


    【解决方案1】:

    看起来您没有在此处构建生成的 xcworkspace 文件。在你的命令中切换到那个,你应该没问题。

    【讨论】:

    • 谢谢!!就是这样。
    猜你喜欢
    • 1970-01-01
    • 2017-05-17
    • 1970-01-01
    • 2020-05-05
    • 2013-01-14
    • 2023-04-07
    • 2018-12-11
    • 2021-03-24
    • 1970-01-01
    相关资源
    最近更新 更多