2017年9月22日 星期五

Xcode 9 code signing

20170922 Xcode 9 signing

Xcode9 又把 exportOption 改掉了

平常用的 script

xcodebuild -exportArchive -archivePath ./release/output.xcarchive -exportOptionsPlist ios/export_ship.plist -exportPath ./release

要修改一下 ios/

<?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>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>signingStyle</key>
<string>manual</string>
<key>signingCertificate</key>
<string>iOS Distribution</string>
<key>provisioningProfiles</key>
<dict>
<key>com.your.bundle.id</key>
<string>ProvisioningProfiles name</string>
</dict>
</dict>
</plist>

這次新增了

  • signingStyle
  • signingCertificate
  • provisioningProfiles
    • 這個從 XXXXXX.xcodeproj/project.pbxproj 去找出名字

詳細的選項可以參考 Code Signing Updates in Xcode 9