xcode 詹金斯和 CocoaPods

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24673310/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:12:12  来源:igfitidea点击:

Jenkins & CocoaPods

iosxcodegitjenkinscocoapods

提问by Cyupa

I'm currently experimenting with Jenkins and CocoaPods. I've read that adding the CocoaPods and Xcode plugins to Jenkins would suffice to get a Jenkins build. Seems like I've missed something and I just can't figure it out.

我目前正在试验 Jenkins 和 CocoaPods。我读过将 CocoaPods 和 Xcode 插件添加到 Jenkins 就足以构建 Jenkins。好像我错过了一些东西,我就是想不通。

The Xcode Workspace is configured to have a derived data folder relative to the workspace and that folder is build. The main project's schema file in the workspace is shared. And all this is pushed to a repository: https://github.com/cyupa/JenkinsWithCocoaPods.git

Xcode 工作区配置为具有相对于工作区的派生数据文件夹,并且该文件夹是构建的。工作区中主项目的架构文件是共享的。所有这些都被推送到一个存储库:https: //github.com/cyupa/JenkinsWithCocoaPods.git

I still end up with the same console output, that it wasn't able to find the Pods library build:

我仍然得到相同的控制台输出,它无法找到 Pods 库构建:

library not found for -lPods clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:    
Ld build/JenkinsWithCocoaPods.build/Release-iphoneos/JenkinsWithCocoaPods.build/Objects-normal/armv7s/JenkinsWithCocoaPods normal armv7s    
Ld build/JenkinsWithCocoaPods.build/Release-iphoneos/JenkinsWithCocoaPods.build/Objects-normal/armv7/JenkinsWithCocoaPods normal armv7  
Ld build/JenkinsWithCocoaPods.build/Release-iphoneos/JenkinsWithCocoaPods.build/Objects-normal/arm64/JenkinsWithCocoaPods normal arm64 (3 failures) Build step 'Xcode' marked build as failure 
Finished: FAILURE

Any idea of what I might be doing wrong? Should I run some scripts, isn't xcodebuildalready integrating the Pods build while building the target?

知道我可能做错了什么吗?我是否应该运行一些脚本,xcodebuild在构建目标时是否已经集成了 Pods 构建?

回答by Cyupa

After a while, I managed to get it right. Because CocoaPods adds more Build Schemes, you must specify the scheme you want to use. In this case the main scheme associated with the main target. I also compiled a step-by-step tutorial on how to setup Jenkins for your iOS project here: https://github.com/cyupa/JenkinsCI-iOS

过了一会儿,我设法把它弄对了。因为 CocoaPods 增加了更多的 Build Schemes,所以你必须指定你想要使用的 scheme。在这种情况下,主要方案与主要目标相关联。我还在此处编译了有关如何为您的 iOS 项目设置 Jenkins 的分步教程:https: //github.com/cyupa/JenkinsCI-iOS