Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
marpies committed Jun 18, 2018
1 parent c3b00ab commit c4c99ab
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ Development of this extension is supported by [Master Tigra, Inc.](https://githu

## Native SDK versions

* iOS `v2.6.2` (Jan 10, 2018)
* Android `v3.7.1` (Dec 15, 2017)
* iOS `v2.8.5` (May 19, 2018)
* Android `v3.9.1` (May 19, 2018)

## Requirements

* iOS 8+
* Android 4+
* Adobe AIR 29+

## Getting started

Expand Down Expand Up @@ -259,14 +265,25 @@ OneSignal.settings

All these values default to `false` and changing them after the extension is initialized has no effect.

Now proceed with ANE initialization. The `init` method should be called in your document class' constructor, or as early as possible after your app's launch. Replace `{ONE-SIGNAL-APP-ID}` with your OneSignal app ID:
In order to comply with GDPR or other regulations, you should make sure you appropriately disclose and get consent to send data to OneSignal.

Your application should call the `setRequiresUserPrivacyConsent` method before initializing the SDK. If you pass in `true`, your application will need to call the `provideConsent` method before the OneSignal SDK gets fully initialized. Until this happens, you can continue to call other methods (such as `sendTags`), but nothing will happen.

The initialization should take place in your document class' constructor, or as early as possible after your app's launch. Replace `{ONE-SIGNAL-APP-ID}` with your OneSignal app ID:

```as3
// The SDK will delay initialization
OneSignal.setRequiresUserPrivacyConsent( true );
if( OneSignal.init( "{ONE-SIGNAL-APP-ID}" ) ) {
// successfully initialized
}
// Once the user has given you permission to share his data
OneSignal.provideUserConsent( true );
```

The consent setting is persisted between sessions. This means that your application only ever needs to call provideConsent a single time and the setting will be persisted (remembered) by the SDK.

If `OneSignal.settings.autoRegister` is set to `false` when initializing the extension, you will need to call `OneSignal.register()` later at some point to attempt registration with the notification servers. Generally, it is recommended to avoid auto registration to provide better user experience for users who launch your app for the very first time.

#### Managing user subscription
Expand Down Expand Up @@ -317,12 +334,6 @@ private function onTagsRetrieved( tags:Object ):void {
}
```

## Requirements

* iOS 7+
* Android 4+
* Adobe AIR 20+

## Documentation
Generated ActionScript documentation is available in the [docs](docs/) directory, or can be generated by running `ant asdoc` from the [build](build/) directory.

Expand All @@ -334,7 +345,17 @@ The ANE has been written by [Marcel Piestansky](https://twitter.com/marpies) and

## Changelog

#### January 20, 2017 (v1.3.0)
#### June 18, 2018 (v1.4.0)

* UPDATED OneSignal SDKs for both iOS (v2.8.5) and Android (v3.9.1)
* ADDED new API related to user privacy
* `setRequiresUserPrivacyConsent( value:Boolean )`
* `provideUserConsent( value:Boolean )`
* `get userProvidedPrivacyConsent():Boolean`
* FIXED notification click tracking
* UPDATED `isActive` notification property

#### January 20, 2018 (v1.3.0)

* UPDATED OneSignal SDKs for both iOS (v2.6.2) and Android (v3.7.1)
* ADDED `clearOneSignalNotifications` APIs
Expand Down

0 comments on commit c4c99ab

Please sign in to comment.