Skip to content

Troubleshooting

Alexander Boldyrev edited this page Nov 8, 2022 · 1 revision

We will provide an information how to workaround possible cordova issues here:

1. Building for ios using Xcode 9 is broken in cordova 7.1.0.

Build fails with message:

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.}

This issue is already fixed by cordova devs, but not yet released:

How to reproduce:

  1. Create cordova project with ios platform and Mobile Messaging plugin added.
  2. Enable push notifications in project capabilities
  3. Run cordova build ios

Workaround:

Try to use build.json file (Cordova docs)

  1. Create build.json file with your signing settings and put it to the your Cordova application folder. Example:
{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "XXX",
            "packageType": "development",
            "provisioningProfile": "Mobile Messaging Development",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Distribution",
            "developmentTeam": "XXX",
            "provisioningProfile": "Mobile Messaging AdHoc",
            "packageType": "ad-hoc",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        }
    }
}
  1. Run cordova build with --buildConfig option. Example: cordova build --release --buildConfig build.json
Clone this wiki locally