Before we jump into installing and initializing Fastlane we have to make sure our Cordova project is in proper shape.
The following paragraphs will make sure you have 1) added both
android platforms to the project, 2) use your own unique project name and 3) package id, 4) app version and 5) assets.
Make sure you have both the
android platform added to your project. You can check by running
ionic cordova platform list. You should get output similar to this:
> ionic cordova platform list √ cordova platform ls - done! Installed platforms: android 6.2.3 ios 4.4.0 Available platforms: [...]
If one is missing, just run
ionic cordova platform add ios or
ionic cordova platform add android to add it.
If one is outdated, run
ionic cordova platform update ios or
ionic cordova platform update android to update it.
New Ionic projects by default are generated with the app name
MyApp - which is what will be displayed on your user’s smartphone screen beneath your app icon. You can set that to e.g.
Fastlane Ionic by changing your
After saving the file, run
ionic cordova prepare to update the generated Cordova projects.
(This will probably prompt you to remove and re-add the
ios platform as changing the project name requires bigger changes here (renaming of files and folders instead of just editing some files as for
android) which you do by executing the commands shown to you - followed by another
ionic cordova prepare).
New Ionic projects also by default are generated with
io.ionic.starter as package ID. This “backwards domain” string is not visible to your users, but both Apple App Store and Google Play Store use it to identify your app and it has to be globally unique - so change it to something related to your app. Again you can edit
config.xml to change this:
<widget id="zone.ionic.example" …>
ionic cordova prepare to update the Cordova projects.
Each Ionic project starts as version
0.0.1 by default. If this will be the first version you want to release to your testers or users, you don’t have to change anything. If you want to start with
17.35.99 (for whatever reason), you again have to edit
<widget … version="1.0.0" …>
ionic cordova prepare makes sure these changes are propagated to the native projects.
New Ionic projects come with a default app icon. Before uploading your app to the stores you will probably want to change that. You can do that by editing the
resources/icon.png and then running
ionic cordova resources.
> ionic cordova resources √ Collecting resource configuration and source images - done! √ Filtering out image resources that do not need regeneration - done! √ Uploading source images to prepare for transformations - done! √ Generating platform resources: 48 / 48 complete - done! √ Modifying config.xml to add new image resources - done!
This will generate all the required assets.
ionic cordova prepare will copy them over to the native Cordova projects.
When you Ionic Cordova project is fully prepared, you can install