どうも中田です
ionic使っててbuildで引っかかりましたー
ionicでpushを実装しようとして ionic cordova build ios
したらこんなエラー
…
** ARCHIVE SUCCEEDED **
[MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/_r/y43h4lfx055d4q7xth1n_ql80000gn/T/XXXXXXXXX_2018-07-16_19-22-36.646.xcdistributionlogs'.
[MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fe2fdce0fc0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=9 \"\"XXXXXXXXX.app\" requires a provisioning profile with the Push Notifications feature.\" UserInfo={NSLocalizedDescription=\"XXXXXXXXX.app\" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
)}
error: exportArchive: "XXXXXXXXX.app" requires a provisioning profile with the Push Notifications feature.
Error Domain=IDEProvisioningErrorDomain Code=9 ""XXXXXXXXX.app" requires a provisioning profile with the Push Notifications feature." UserInfo={NSLocalizedDescription="XXXXXXXXX.app" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
** EXPORT FAILED **
(node:89830) UnhandledPromiseRejectionWarning: Error code 70 for command: xcodebuild with args: …
プロビジョニングプロファイルが見えてないみたいすね(こないだまではできてたんだけどなー)
ionicではビルド構成ファイル(build.json)で細かい指定ができるようなので
プロビジョニングはこれだ!を指定してあげます(参考)
build.json
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"packageType": "development",
"developmentTeam":"XXXXXXXXXX",
"provisioningProfile": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
},
"release": {
"codeSignIdentity": "iPhone Distribution",
"packageType": "app-store",
"developmentTeam":"XXXXXXXXXX",
"provisioningProfile": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
}
}
そして再実行!
ionic cordova build ios
結果
無事Buildできました!
** ARCHIVE SUCCEEDED ** [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/_r/y43h4lfx055d4q7xth1n_ql80000gn/T/XXXXXX_2018-07-16_20-39-18.511.xcdistributionlogs'. Exported property.xcarchive to: /app/platforms/ios/build/device ** EXPORT SUCCEEDED **
いや〜、うちのエンジニアが困ってたので解決できてよかったです
参考にしたサイト
After upgrading to xcode 9, cordova app won’t build, error 70, requires provisioning profile