The error and the fix
If you are working with a Cordova project and do an Ionic Appflow Package build, and the build fails for iOS, look for this message in the build log:
Code Signing Error: Provisioning profile "CS Demo Dev" has app ID "com.yourdomain.yourapp", which does not match the bundle ID "io.ionic.starter"
If the error is there, edit your app's config.xml
file, and change the widget element's ID to match the build ID specified in the provisioning profile. Using the above error as an example, it should be set to this.
<?xml version='1.0' encoding='utf-8'?> <widget id="com.yourdomain.yourapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>YourApp</name> ...
What's happening
When you first set up your app for native builds, Ionic initializes config.xml
with io.ionic.starter
as the ID.
<?xml version='1.0' encoding='utf-8'?> <widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>YourApp</name> ...
Never leave the value set to io.ionic.starter. Instead, the id must be set to match your iOS bundle ID (and match your Android applicationId).
Pro tip
A handy way to discover common errors like this, is to use the command-line statement:
ionic doctor check
Comments
0 comments
Article is closed for comments.