Skip to content

minimumBackgroundDuration -- does not function #80

Description

@bramski

Setup your app as follows for sync:

const syncOptions = {
      installMode: codePush.InstallMode.ON_NEXT_RESTART,
      mandatoryInstallMode: codePush.InstallMode.ON_NEXT_RESUME,
      minimumBackgroundDuration: 600,
      deploymentKey: codePushKey,
    };

    const runSync = () => {
      codePush.sync(syncOptions, onSyncStatusChanged, onDownloadProgress);
    };

    // Replicates codePush.CheckFrequency.ON_APP_RESUME ourselves: an initial
    // check on launch, then one on every foreground.
    runSync();
    AppState.addEventListener('change', newState => {
      if (newState === 'active') {
        runSync();
      }
    });

add a mandatory update... background it... resume it 10 minutes later... no update is installed. User is forced to RESTART to see the change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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