Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

app rolls back to the version before update after closed and opened again #48

Open
@metalllus

Description

@metalllus

I am testing this on an Ionic/Capacitor/Angular/Firebase project, NOT Cordova.
What I have done so far:

Created new app with appcenter apps create -d <appDisplayName> -o iOS -p Cordova
Created new deployment with appcenter codepush deployment add -a <ownerName>/<appName> Production
Built new app version ready for release with ionic capacitor build
Released new version with appcenter codepush release -a <ownerName>/<appName> -c ./PATH_TO_BUILD -m -t 1.0 -d Production
In the angular app I have this:

codePush
      .sync(
        {
          installMode: InstallMode.ON_NEXT_RESUME,
          mandatoryInstallMode: InstallMode.IMMEDIATE,
          onSyncStatusChanged: (status) => {
            console.log(status)
          },
        },
        (progress) => {
          console.log(progress)
          );
        }
      )
      .then((status) => {
        console.log(status)
      });

If I make an update available via Codepush, the update downloads and installs, the app restarts, I can see the changes, everything works.
But if I close the app and open it again, it loads in the state before the update was applied.
Tested on emulator and real device. Same behavior.
If anyone has a suggestion where I got it wrong, please do let me know.

*UPDATE: Today I tested also on Android, behavior is exactly the same as on iOS.
*UPDATE 2: Another thing that does not work for me are the callbacks that should be returning the update download progress and onSyncStatusChanged. Even though the update gets downloaded and installed these callbacks never seem to fire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions