Closed crossan007 closed 6 months ago
You are linking Ionic Framework Breaking changes, those have nothing to do with Ionic CLI breaking changes. Ionic CLI breaking changes are documented here.
The remaining
deploy
commands have been renamed tolive-update
. So instead of runningionic deploy add
you have to runionic live-update add
, it's properly documented on the first link you shared.
If you are using Capacitor, there is a new Capacitor plugin you can use instead of cordova-plugin-ionic
, see https://ionic.io/docs/appflow/deploy/setup/capacitor-sdk
@jcesarmobile Thanks for the clarification! I was getting lost in the docs, so I appreciate it.
Description: I'm not 100% sure this is the correct location to file this bug; however, in the absence of clarity and search results, I'm proceeding here. Hopefully I have included enough keywords that anyone else experiencing this may find solutions.
The NPMJS package
cordova-plugin-ionic
provides access to theDeploy
object for managing Ionic AppFlow Live Deploys; described in documentation at https://ionic.io/docs/appflow/tutorial/live_updates_api#preparing-the-home-page-to-use-live-update-apiThis allows developers to provide a mechanism to end-users to manage / trigger live updates.
The list of Ionic CLI v7 breaking changes does not mention broken plugins.
Using
@ionic/cli
6.20.9
, the build steps for this package are executed, but in@ionci/cli
7.1.1
, the build steps are not executed. This definitely affects Android target platform, and might affect ios targets.This bug may manifest when choosing a different AppFlow build stack for instance, changing from
2023.04
to2023.06
. A (probably sub-optimal) workaround to using the latest build stack is simply to include the Ionic CLI as a devDependency inpackage.json
:"@ionic/cli": "^6.20.9"
.The plugin build steps in question are https://github.com/ionic-team/cordova-plugin-ionic/blob/main/plugin.xml#L52C18-L52C18 which appear to be responsible for writing configurations to
android\app\src\main\res\values\strings.xml
Steps to Reproduce: Run
ionic deploy add --app-id=default-value --channel-name=Production_5.0.0 --update-method=background
Output: Using CLI 6.x:, the following strings are present in
android\app\src\main\res\values\strings.xml
Using CLI 7.x, these strings are absent from the
strings.xml
file, and a followingnpx cap sync
command shows the following warning when run forios
platform (but not forandroid
):Expected Behavior: The string values are present in
android\app\src\main\res\values\strings.xml
Additional Info: To further complicate matters, the failure to populate
strings.xml
does not cause the build to completely fail; an APK file is still generated. With the missing strings, lots of runtime errors occur:Most notably:
VM4:2910 Uncaught (in promise) String resource ID #0x0
But also, it seems like the failure to load this plugin at runtime prevents lots of other application initialization:
Possibly Related Issues/Threads:
ionic deploy
commandhttps://github.com/ionic-team/cordova-plugin-ionic/issues/223
cordova-plugin-ionic
plugin. Is this plugin old/deprecated, and if so what's the replacement?