From c4c99abed53c55b332fe76c0690ea02fa17c5e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Pies=CC=8Ct=CC=8Cansky=CC=81?= Date: Mon, 18 Jun 2018 23:33:43 +0200 Subject: [PATCH] Update README.md --- README.md | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e1dcf48..b78f8f0 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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. @@ -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