cordovavisual-studio-cordova

After upgrading to xcode 9, cordova app won't build, error 70, requires a provisioning profile with the Push Notifications feature


VS2015 Remote Build, Cordova 6.5.0, Xcode 9.3.1,

I've tried hard but still can't solve the problem. Anyone can help?

Error Message:

1>  ** ARCHIVE SUCCEEDED **
1>MDAVSCLI : error : exportArchive: "XXX.app" requires a provisioning 
profile with the Push Notifications feature
1>  Error Domain=IDEProvisioningErrorDomain Code=9 ""XXX.app" requires a 
provisioning profile with the Push Notifications feature." UserInfo= 
{NSLocalizedDescription="XXX.app" requires a provisioning profile with the 
Push Notifications feature., NSLocalizedRecoverySuggestion=Add a profile to 
the "provisioningProfiles" dictionary in your Export Options property list.}
1>
1>  ** EXPORT FAILED **
1>
1>   Error code 70 for command: xcodebuild with args: -exportArchive,- 
archivePath,XXX.xcarchive,- 
exportOptionsPlist,/Users/UserName/.taco_home/remote-builds/taco- 
remote/builds/20190/cordovaApp/platforms/ios/exportOptions.plist,- 
exportPath,/Users/UserName/.taco_home/remote-builds/taco- 
remote/builds/20190/cordovaApp/platforms/ios/build/device

Solution

  • After upgrade my cordova project to Cordova@7.1.0, and change my build.json below:

    {
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "yourTemaID",
            "packageType": "development",
            "automaticProvisioning": true,
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "yourTemaID",
            "packageType": "app-store",
            "automaticProvisioning": true,
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        }
    }}
    

    Now,everything work like a charm!

    Cordova Doc iOS build.json