LoginSignup
2
1

More than 5 years have passed since last update.

VSTS-CIのCordova-iOSビルドで「 Error code 65 for command: xcodebuild」や「Error code 70 for command: xcodebuild」エラーが表示された時の対処法

Posted at

:one: 環境

  • VSTS (Visual Studio Team Services) CIサービス (無料プラン)
  • Agent: Hosted macOS Preview
  • Node.js: v6.14.1
  • cordova: v7.1.0
  • cordova-ios: 4.5.4

:two: エラー内容

VSTS-CIのCordova-iOSビルドで以下のエラーが表示された。

エラー内容:パターン1
Code Signing Error: my-ionic1 has conflicting provisioning settings. my-ionic1 is automatically signed, but provisioning profile 5568-****-****--****--****--****-****6d55 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 Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'

Error code 65 for command: xcodebuild
エラー内容:パターン2
error: exportArchive: "my-ionic1.app" requires a provisioning profile.
Error Domain=IDEProvisioningErrorDomain Code=9 ""my-ionic1.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="my-ionic1.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

Error code 70 for command: xcodebuild

:three: 原因

原因の特定はできなかった。
おそらく、xcode-8からプロビジョニングプロファイルが自動取得になったため、CI環境でその自動取得がうまくいっていないと思われる。

:four: 対応

cordovaのビルド設定ファイル(build.json)に、プロビジョニングプロファイル指定方法(CODE_SIGN_STYLE)を手動(Manual)にして、provisioningProfile項目にプロビジョニングプロファイルのUUIDを指定する。

build.json
{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "**********",
            "packageType": "development",
            "provisioningProfile": "********-****-****-****-************",
            "buildFlag": [
                "CODE_SIGN_STYLE=Manual"
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "**********",
            "packageType": "app-store",
            "provisioningProfile": "********-****-****-****-************",
            "buildFlag": [
                "CODE_SIGN_STYLE=Manual"
            ]
        }
    }
}
  1. developmentTeamprovisioningProfile**********は各々設定する
  2. xcode-8からcodeSignIdentity はdebugとreleaseどちらもiPhone Developerにする
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1