1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VSTS-CIのCordova-iOSビルドで「Error: Please specify a build.json file」エラーが表示された時の対処法

Last updated at Posted at 2018-04-07

: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ビルドで「Error: Please specify a build.json file according to https://taco.visualstudio.com/en-us/docs/vs-taco-2017-ios-guide/#xcode8 」エラーが表示された。

エラーログの内容
2018-04-06T04:49:15.6748020Z ##[section]Starting: Cordova Build ios
2018-04-06T04:49:15.6804790Z ==============================================================================
2018-04-06T04:49:15.6817860Z Task         : Cordova Build
2018-04-06T04:49:15.6830980Z Description  : Build a hybrid app project based on the Cordova CLI, Ionic CLI, TACO CLI, or other Cordova-compliant CLI
2018-04-06T04:49:15.6844330Z Version      : 1.3.11
2018-04-06T04:49:15.6858230Z Author       : Microsoft Corporation
2018-04-06T04:49:15.6871830Z Help         : [More Information](http://go.microsoft.com/fwlink/?LinkID=691186)
2018-04-06T04:49:15.6885470Z ==============================================================================
2018-04-06T04:49:16.3490900Z Input to determineIdentity: {"cwd":"/Users/vsts/agent/2.131.0/work/1/s","unlockDefaultKeychain":false,"defaultKeychainPassword":"","p12":"/Users/vsts/agent/2.131.0/work/1/s/keys/ios/ios_development.p12","p12pwd":"********"}
2018-04-06T04:49:16.5429040Z 1 identity imported.
2018-04-06T04:49:16.8609810Z   1) 874E********************************DA2A "iPhone Developer: *********@gmail.com (GJ******VH)"
2018-04-06T04:49:16.8624080Z      1 valid identities found
2018-04-06T04:49:16.9113980Z     "/Users/vsts/agent/2.131.0/work/1/s/_tasktmp.keychain"
2018-04-06T04:49:16.9128350Z     "/Users/vsts/Library/Keychains/login.keychain-db"
2018-04-06T04:49:16.9832060Z determineIdentity result {"identity":"iPhone Developer: *********@gmail.com (GJ******VH)","foundIdentity":"iPhone Developer: *********@gmail.com (GJ******VH)","keychain":"/Users/vsts/agent/2.131.0/work/1/s/_tasktmp.keychain"}
2018-04-06T04:49:16.9846950Z Input to determineProfile: {"cwd":"/Users/vsts/agent/2.131.0/work/1/s","provProfileUuid":"","provProfilePath":"/Users/vsts/agent/2.131.0/work/1/s/keys/ios/3. Provisioning Profiles/flow_dev_profile.mobileprovision","removeProfile":false}
2018-04-06T04:49:16.9861030Z Provisioning profile file found.
2018-04-06T04:49:17.0639930Z /Users/vsts/agent/2.131.0/work/1/s/keys/ios/3. Provisioning Profiles/flow_dev_profile.mobileprovision has UUID of 5568****-****-****-****-********6d55
2018-04-06T04:49:17.0758600Z determineProfile result {"uuid":"5568****-****-****-****-********6d55","foundUuid":"5568****-****-****-****-********6d55"}
2018-04-06T04:49:17.0772860Z Module cache at /Users/vsts/.taco_home/node_modules
2018-04-06T04:49:17.8386950Z cordova@7.1.0 already installed.
2018-04-06T04:49:18.7689050Z Adding Xcconfig update hook
2018-04-06T04:49:21.0354050Z Module cache at /Users/vsts/.taco_home/node_modules
2018-04-06T04:49:21.7954790Z cordova@7.1.0 already installed.
2018-04-06T04:49:28.4771480Z Processing res/native for ios
2018-04-06T04:49:28.7206820Z Removing Xcconfig update hook
2018-04-06T04:49:28.7482230Z Error: Please specify a build.json file according to https://taco.visualstudio.com/en-us/docs/vs-taco-2017-ios-guide/#xcode8
2018-04-06T04:49:28.7497610Z     at /Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/taco-team-build/taco-team-build.js:163:23
2018-04-06T04:49:28.7520940Z     at _fulfilled (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:854:54)
2018-04-06T04:49:28.7535540Z     at self.promiseDispatch.done (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:883:30)
2018-04-06T04:49:28.7550750Z     at Promise.promise.promiseDispatch (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:816:13)
2018-04-06T04:49:28.7566670Z     at /Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:624:44
2018-04-06T04:49:28.7581760Z     at runSingle (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:137:13)
2018-04-06T04:49:28.7597140Z     at flush (/Users/vsts/agent/2.131.0/work/_tasks/CordovaBuild_70e94267-15dc-434d-8973-023d766825d7/1.3.11/node_modules/q/q.js:125:13)
2018-04-06T04:49:28.7611510Z     at _combinedTickCallback (internal/process/next_tick.js:73:7)
2018-04-06T04:49:28.7625770Z     at process._tickCallback (internal/process/next_tick.js:104:9)
2018-04-06T04:49:28.7724730Z ##[error]Task failed
2018-04-06T04:49:28.8199300Z ##[section]Finishing: Cordova Build ios

:three: 原因

cordova-iosビルドで必要な build.json ファイルが無かった。

:four: 対応

config.xmlと同じディレクトリにbuild.jsonを追加する。

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にする

参考URL

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?