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

[iOS] CodePush update lost after restarting the App #1904

@vssalcedo

Description

@vssalcedo

Hello there.
I’m experiencing a strange behavior when pushing updates with CodePush on iOS Platform.

My binary has the version 2.0. When I make a CodePush update targeting the 2.0 version, the update gets successfully installed on device. But when I restart the app (close and open again), it returns to the original binary bundle.

This issue is happening only on iOS, Android is working fine.

Expected Behavior

After restarting the app, keep the installed codePush version

Actual Behavior

After restarting the app, i get the old bundle version.

Scenario

  • Using release mode to take the updates from Codepush server instead of the local package server.

  • Already replaced this line on AppDelegate.m as the documentation points out:

jsCodeLocation = [CodePush bundleURL];

I’m using the JS wrapper this way:

let codePushOptions = {
    checkFrequency: codePush.CheckFrequency.ON_APP_START
};

export default UpdatesHandler = codePush(codePushOptions)(UpdatesHandler);

And I sync with the codePush server calling the proper method on componentDidMount:

componentDidMount() {
codePush.sync({
            updateDialog: false,
            installMode: codePush.InstallMode.IMMEDIATE
 });
}

I also tried calling codePush.notifyAppReady() before the sync call but no luck.

I've already checked on mscenter and there are not rollbacks registered. And as you can see here I’m targeting the 2.0 version in all releases:

Screenshot

Environment

  • react-native-code-push version: 6.2.1
  • react-native version: 0.60.5
  • iOS/Android/Windows version: iOS 13.3.1
  • Does this reproduce on a debug build or release build? Release build
  • Does this reproduce on a simulator, or only on a physical device? physical device, haven't tried on simulator yet

Metadata

Metadata

Assignees

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