Hi,
Little trouble with getting AppFlow to hot deploy my app…
This is based on a whole new project.
- The project has been created today (July 24th), with the latest CLI.
- The Android target has been added (
ionic platform cordova add android
) - An .apk file was successfully created and deployed on the physical android device.
- It has the right icon, it boots, shows custom splash screen, etc.
So far, so good.
Trying to have my app hot re-deployed, I have done the following:
- Linked my bitbucket and properly saw my commits appear in the AppFlow web ui
- Followed the quick install guide (https://ionicframework.com/docs/appflow/quickstart/installation)
- Re-built my .apk with the updated package (see below, it contains the app id & co).
- Pushed an update that’s easy to identify (main page contents: hello world -> hello ionic)
- Created a new web build
- Assigned that successful build to the Master channel.
- Re-started the ionic app on the device, re-installed the app, waited with the app in foreground, restarted, etc.
No success so far, it still displays “hello word” instead of getting the latest version “hello ionic”.
The package.json properly shows my app id in the cordova section:
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-ionic": {
"APP_ID": "__THE_ACTUAL_IONIC_APP_ID__",
"CHANNEL_NAME": "Master",
"UPDATE_METHOD": "background"
}
},
"platforms": [
"android"
]
}
However, I observe that the config.xml doesn’t list the “cordova-plugin-ionic” – here is the end of the xml (right after the section):
</platform>
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
</widget>
So I manually ran the following command, but the terminal states that this plugin is already installed:
cordova plugin add cordova-plugin-ionic --save --variable APP_ID="__THE_ACTUAL_IONIC_APP_ID__" --variable CHANNEL_NAME="Master" --variable UPDATE_METHOD="background"
Additional info:
- I haven’t subscribed (yet) to the “growth” plan, still using the “starter” one as the 100 hot deploys/month is enough in this early stage.
- Build approach 1: I began building with Adobe Phonegap Build (part of the “Creative Cloud” services). It properly builds my Android .apk and lists the exact plugins found in config.xml (doesn’t list the base “cordova-plugin-ionic”).
- The Phonegap Build has been configured to use the latest Phonegap CLI (8.0.0 -> iOS 4.5.4 / Android 7.0.0 / web 5.0.0)
- Build approach 2 (update July 25th): I’ve setup the local computer to build an .apk and use the adb command line to deploy. Same result.
- When opening the “www” folder following my prod build, I perform a full text search on the .js files and none is referring to my Ionic app id… is this normal? Neither the config.xml neither the sources are referring to it.
Thank you very much for your attention so far!