【发布时间】:2016-06-29 16:29:42
【问题描述】:
我正在尝试通过 Jenkins 和 CocoaPods 归档我的代码。
但是build报错,好像项目能找到CocoaPods生成的模块。
我使用 swift 编码,项目在 Xcode 中构建成功
podfile 是这样的:
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'AFNetworking'
pod 'ObjectMapper'
end
Jenkins 中的错误日志是:
....
/Users/xxx/.jenkins/jobs/LIFE_iOS/workspace/MyProject/Core/Model/ItemResult.swift:10:8: error: no such module 'ObjectMapper'
import ObjectMapper
^
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/xxx/.jenkins/jobs/LIFE_iOS/workspace/MyProject/MGFramework/CustomViews/MartyJunior/MJTableViewTopCell.swift
...
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)
Build step 'Xcode' marked build as failure
Finished: FAILURE
【问题讨论】:
-
完成 pod install 后,您应该打开 Xcode.workspace 并构建它而不是 .project。试试看
-
感谢您的回复,它确实有效。还有一个新错误,你能帮我解决它吗? ` === BUILD TARGET ObjectMapper OF PROJECT Pods WITH CONFIGURATION Release === Check dependencies Code Sign error: Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings ("xxxxx") has an AppID of "me. xxx.ios”,它与您的包标识符“org.cocoapods.ObjectMapper”不匹配。 ** BUILD FAILED ** 以下构建命令失败:检查依赖项构建步骤“Xcode”将构建标记为失败已完成:FAILURE`
-
请在下方标记为答案。对于您的第二个问题,请参阅:stackoverflow.com/questions/27973011/…