jenkins xcodebuild命令行打包iOS项目问题汇总
来源:互联网 发布:怎么报考网络教育 编辑:程序博客网 时间:2024/04/28 16:53
这几天折腾了jenkins对iOS swift项目的持续集成,碰到了很多问题,记录下吧
1. 缺少scheme
xcodebuild: error: The project named “Foo” does not contain a scheme named “Bar”. The “-list” option can be used to find the names of the schemes in the project.
解决办法:
The root cause is that the default behavior of Schemes is to keep schemes ‘private’ until they are specifically marked as shared. In the case of a command-line initiated build, the Xcode UI never runs and the xcoderun tool doesn’t have its own cache of Schemes to work with.
To your schema be visible for command-line build you must mark it as a shared scheme.
Choose Scheme > Manage Schemes (from the Product Menu).
Ensure the ‘Shared’ box is checked for that scheme
A new .xcscheme file has been created in your project at
WorkspaceName.xcworkspace/xcshareddata/xcschemes.
Commit this file to your repository
2. Error: User interaction is not allowed.
运行下面的命令可解决
$ security unlock-keychain -p ~/Library/Keychains/login.keychain$ security show-keychain-info ~/Library/Keychains/login.keychainKeychain "/Users/XXX/Library/Keychains/login.keychain" no-timeout
3. Xcode 7后导出IPA命令发生变化
以前我是通过下面的命令打包的,但现在的swift项目这样导出的包在iPhone安装后直接闪退
xcodebuild -target ${TARGET_NAME} -configuration ${BUILD_CONFIGURATION} -sdk phones buildxcrun -sdk iphoneos PackageApplication -v ${APP_NAME} -o ${IPA_PATH}
Xcode7之后取消了原来的-exportFormat,而是使用exportOptionsPlist 来取代,具体的使用方法可以在Terminal打xcodebuild –help查看。
我们需要自己创建一个plist作为Export Options,只要有这个配置文件,那我们在使用这个命令的时候就能打出跟手动用Xcode Archive之后export出的ipa一样了。
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict> <key>teamID</key> <string>XXXXXXX</string> <key>method</key> <string>enterprise</string> <key>compileBitcode</key> <false/> <key>uploadSymbols</key> <false/></dict></plist>
4. 最新的xcodebuild 导出ipa命令
xcodebuild archive -project {xcodeproj} -scheme '{scheme}' -sdk iphoneos -archivePath {archive_path}xcodebuild -exportArchive -archivePath {archive_path} -exportPath {export_path} -exportOptionsPlist {export_plist_path}
[本文独立博客地址](http://www.offbye.com)
- jenkins xcodebuild命令行打包iOS项目问题汇总
- xcodebuild 命令行编译问题汇总
- ios xcodebuild命令行自动打包 shell脚本
- ios命令行自助打包-使用xcodebuild和xcrun打包签名
- Jenkins通过Xcodebuild命令打包
- xcodebuild命令行编译打包iOS应用和企业发布
- ios jenkins 打包问题
- 利用xcodebuild命令行进行打包
- Jenkins打包之xcodebuild .sh文件
- 【指导】iOS APP Jenkins自动编译(xcodebuild)、打包(xcrun)、发布(Apache/scp)
- IOS命令打包 xcrun xcodebuild
- iOS使用xcodebuild命令打包
- ios xcodebuild自动打包 知识点
- iOS 打包问题汇总
- Jenkins使用IOS打包问题(一)
- Jenkins使用IOS打包问题(二)
- xcodebuild xcrun ios 自动打包命令 范例
- iOS自动签名打包(xcodebuild)----常用
- 关于小米无人机的未来
- Visio中添加、移动或删除形状上的连接点的方法
- 指数基本定理及应用
- Linux 下的man page
- 字符串的模式匹配,KMP算法
- jenkins xcodebuild命令行打包iOS项目问题汇总
- Error occurred initialization of VM Could not allocate metaspac:xxx bytes发生时
- Linux应用编程之图片浏览APP实现
- 原生JS实现Ajax
- UICollectionView如果在数据不够一屏时上下滚动
- 桥接模式(Bridge)-Java
- 按下Home键后重新返回程序,显示最后的Activity
- React.js Essentials - Packt 2015(读书笔记)
- PHP学习Zero