Search code examples
xcodecordovacordova-ios

Cannot build cordova iOS platform -- error 65 allowProvisioningUpdates


I am getting an error trying to build iOS platform in cordova. I have reinstalled the platform but i get the same error. This works a few day ago

Can you please help me resolve this issue

xcode Version 10.0 (10A255)

my build call..

cordova build ios --release --buildConfig=build.json --device --buildFlag=-allowProvisioningUpdates --gradleArg=--no-daemon`

Here is error

Error: Error code 65 for command: xcodebuild with args: -
exportArchive,-archivePath,myapp.xcarchive,-exportOptionsPlist,/Users/Documents/Development/mymobile/dev/MobileV2/platforms/ios/exportOptions.plist,-exportPath,/Users/Documents/Development/mymobile/dev/MobileV2/platforms/ios/build/device,-allowProvisioningUpdates`

I have a build.json file that I use for the build

"codeSignIdentity": "iPhone Developer", "developmentTeam": "myid", "automaticProvisioning": true, "packageType": "app-store"

More --info

2018-10-19 13:01:08.558 xcodebuild[12415:403301] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/01/dln33_r97tzb95y8c1scy6bc0000gp/T/RandstadJobs_2018-10-19_13-01-08.558.xcdistributionlogs'. error: exportArchive: "RandstadJobs.app" requires a provisioning profile with the Push Notifications feature.

Here an error I see but now sure how to resolve it. I have push enable in the profile

Error Domain=IDEProvisioningErrorDomain Code=9 ""myapp.app" requires a provisioning profile with the Push Notifications feature."

UserInfo={NSLocalizedDescription="myapp.app" requires a provisioning profile with the Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}


Solution

  • You need to enable push notification in your project in Xcode, then select a provisioning/developer profile. Best is to allow automatic signing and select your Apple identity. It should do the rest on its own.

    If you use xcode10, you also need to change the build system from new to legacy

    File -> WorkSpace Settings -> Build System: Legacy Build System