yarn react-native-onesignal 3.2.0

latest releases: 5.1.3, 5.1.2, 5.1.1...
5 years ago

Expo Support

• Changes the SDK so that running in Expo will no longer cause the SDK to crash. The SDK now checks to make sure that the native event emitter exists before attempting to use it.
• This means OneSignal will not crash in Expo - however - since Expo's dev app cannot load native code, any calls to OneSignal's SDK will simply be ignored until the project is detached from Expo.

GDPR Support

• Adds new methods for Android and iOS that allow developers to require user consent before the SDK is fully initialized.
• Developers can call OneSignal. setRequiresUserPrivacyConsent(true) to require a user's consent before the SDK collects any information.
• Until this point, any calls to the SDK are ignored. Once OneSignal.provideUserConsent(true) is called, the SDK will fully initialize. By default, this behavior is turned off.

JS Initialization

• The SDK can now be used completely by JavaScript, without having to touch any Objective-C or gradle files.
• Developers can call OneSignal.init(appId) to initialize the SDK in JavaScript.
• The older native initialization methods are still present but deprecated.
• Simplifies the setup process, removes the need to modify Xcode build settings for copying header files.

Bug Fixes

• Fixes an issue that would have caused occasional crashes when calling postNotification(), getPermissionSubscriptionState(), and when various errors were returned. This issue was caused by unsafe JSON serialization.

Native Updates

Android SDK - 3.9.0
  • Now supports FCM (Firebase Cloud Messaging) library
    • This upgrade is automatic as long as you followed the OneSignal standard setup guide.
    • After April 11, 2019 Google will drop the GCM from new versions their Play Services library
    • GCM (Google Cloud Messaging) is still supported in the OneSignal SDK until then
    • Issue #507
  • Fixed NPE on UserState.dependValues. Issue #503
iOS SDK - 2.8.3

• The SDK will now work with media attachment URL's that don't end in file extension (ie. .jpg). If a URL is missing a file extension, it will instead use the MIME type of the asset.
• Resolves an incompatibility issue with the HelpShift iOS SDK
• Fixes an issue that caused incorrect "notification opened" events to be sent to OneSignal's backend server

Don't miss a new react-native-onesignal release

NewReleases is sending notifications on new releases.