13 Oct 2016
升级Xcode8后的打包问题
xcodebuild 命令打包报错
Check dependencies BaseProject has conflicting provisioning settings. BaseProject is automatically signed, but provisioning profile InhouseTest has been manually specified. Set the provisioning profile value to “Automatic” in the build settings editor, or switch to manual signing in the project editor. Code signing is required for product type ‘Application’ in SDK ‘iOS 10.0’
关闭 Automatically manage signing 之后正常打包
目前是拉取新代码后通过 Shell 修改文件关闭
sed -i "" s/'ProvisioningStyle = Automatic;'/'ProvisioningStyle = Manual;'/g YourProject.xcodeproj/project.pbxproj
原来打包是这样指定 provison 和签名的
xcodebuild archive -workspace Project.xcworkspace -scheme Project -archivePath Project.xcarchive CODE_SIGN_IDENTITY="identity" PROVISIONING_PROFILE="11111111-1111-1111-1111-111111111111"
升级后这样没用,用了代码库中的 provision 所以报错了
Check dependencies No profile matching ‘DevelopTest’ found: Xcode couldn’t find a profile matching ‘DevelopTest’. Install the profile (by dragging and dropping it onto Xcode’s dock item) or select a different one in the General tab of the target editor. Code signing is required for product type ‘Application’ in SDK ‘iOS 10.0’
还是直接改文件了
sed -i "" s/'PROVISIONING_PROFILE = ".*";'/'PROVISIONING_PROFILE = "1111111-2222-2222-1111-111111111111";'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'PROVISIONING_PROFILE_SPECIFIER = .*;'/'PROVISIONING_PROFILE_SPECIFIER = InhouseTest;'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'CODE_SIGN_IDENTITY = ".*";'/'CODE_SIGN_IDENTITY = "identity";'/g Project.xcodeproj/project.pbxproj
sed -i "" s/'"CODE_SIGN_IDENTITY\[sdk=iphoneos\*\]" = ".*";'/'"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "identity";'/g Project.xcodeproj/project.pbxproj
xcodebuild archive -workspace Project.xcworkspace -scheme Project -archivePath Project.xcarchive
后续
减少了一部分 Shell ,换成多个target的方式,在 xcodebuild 命令里指定不同的 Scheme ,有点像 Gradle 了。
Til next time,
黑水
at 09:45