Skip to content

Commit

Permalink
Merge pull request #2577 from MicrosoftDocs/use-CodePush.InstallMode-…
Browse files Browse the repository at this point in the history
…enum

Update usage of CodePush.InstallMode enum
  • Loading branch information
lucen-ms authored Mar 21, 2024
2 parents fb6017b + 1111785 commit 1b92870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/distribution/codepush/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If an update is available, it will be silently downloaded, and installed the nex
For example, to download and install an update immediately, developers can use the `installMode` parameter as follows:

```javascript
codePush.sync({installMode: InstallMode.IMMEDIATE});
codePush.sync({installMode: CodePush.InstallMode.IMMEDIATE});
```

#### Recommendation
Expand All @@ -52,7 +52,7 @@ Depending on the complexity of the app, pushing an update immediately might be a
// Download the update silently, but install on next
// app resume and after 10 minutes of app inactivity
// We recommend doing this call on app start (e.g. `componentDidMount` event on React Native or `deviceready` on Cordova)
codePush.sync({ installMode: InstallMode.ON_NEXT_RESUME, minimumBackgroundDuration: 60 * 10 });
codePush.sync({ installMode: CodePush.InstallMode.ON_NEXT_RESUME, minimumBackgroundDuration: 60 * 10 });
```

> [!NOTE]
Expand All @@ -62,7 +62,7 @@ codePush.sync({ installMode: InstallMode.ON_NEXT_RESUME, minimumBackgroundDurati
> For Cordova, the first parameter that `codePush.sync()` expects is a `syncStatusCallback`, so to do the same thing, you should insert `null` as the first parameter to the call, i.e:
```javascript
codePush.sync(null, { installMode: InstallMode.ON_NEXT_RESUME, minimumBackgroundDuration: 60 * 10 });
codePush.sync(null, { installMode: CodePush.InstallMode.ON_NEXT_RESUME, minimumBackgroundDuration: 60 * 10 });
```

### 2. Active mode
Expand Down

0 comments on commit 1b92870

Please sign in to comment.