Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemurry committed Nov 6, 2014
1 parent 59d5ffc commit a17e2f5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -18,20 +18,18 @@ connectivity.
## Setup

1. Download and include the AWS JavaScript SDK:

http://aws.amazon.com/sdk-for-browser/
* http://aws.amazon.com/sdk-for-browser/

2. Download and include the Cognito Sync Manager for JavaScript:

[/dist/amazon-cognito.min.js](https://github.com/aws/amazon-cognito-js/blob/master/dist/amazon-cognito.min.js)
* [/dist/amazon-cognito.min.js](https://github.com/aws/amazon-cognito-js/blob/master/dist/amazon-cognito.min.js)

## Usage

**Step 1.** Log into Amazon Cognito management console and create a new identity pool. Be sure to enable the "unauthenticated
identities" option. On the last step of the wizard, make a note of your Account ID, Identity Pool ID, and
Unauthenticated Role ARN.

https://console.aws.amazon.com/cognito/home/?region=us-east-1
* https://console.aws.amazon.com/cognito/home/?region=us-east-1

**Step 2.** Instantiate the AWS JavaScript SDK using the AWS.CognitoIdentityCredentials class, using the information you
gathered from the previous step.
Expand Down Expand Up @@ -125,20 +123,24 @@ dataset.synchronize({
dataset.resolve(resolved, function() {
return callback(true);
});

// Or... callback false to stop the synchronization process.
// return callback(false);

},

onDatasetDeleted: function(dataset, datasetName, callback) {

// Return true to delete the local copy of the dataset.
// Return false to stop the synchronization process so you can .
// Return false to handle deleted datasets outsid ethe synchronization callback.

return callback(true);

},

onDatasetMerged: function(dataset, datasetNames, callback) {

// Return true to continue the synchronization process.
// Return false to handle dataset merges outside the synchroniziation callback.

return callback(false);
Expand Down

0 comments on commit a17e2f5

Please sign in to comment.