Skip to content

Releases: OneSignal/react-native-onesignal

3.2.0

08 May 02:25
Compare
Choose a tag to compare

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

3.1.4

30 Mar 23:50
Compare
Choose a tag to compare

• Added compileSdkVersion, minSdkVersion and buildToolsVersion ext override settings to future proof
• Locked the OneSignal native Java library to an exact version
• Misc clean and comments to the build.gradle
• Fixes #442

3.1.3

29 Mar 01:43
26002a8
Compare
Choose a tag to compare

• Updates to the latest version of the iOS SDK (Android SDK updates are automatically distributed via gradle)
• Adds a new badge handling system in iOS which uses the OneSignalNotificationServiceExtension to perform badge handling logic instead of relying on the backend server
• Removes podfiles from the demo project, which are no longer used to distribute the iOS SDK
• Updates the build.gradle file to a more recent target SDK version and gradle tools version

3.1.2

13 Mar 23:39
d6fa076
Compare
Choose a tag to compare

Updates to use the latest version of the iOS SDK, which includes various bug fixes and also adds a new setting (kOSSSettingsKeyPromptBeforeOpeningPushURL) that controls what happens when a user taps a notification in iOS with a launchURL, whether should pop up an alert asking if they want to open the URL or simply opens it immediately.

3.1.1

27 Feb 18:51
Compare
Choose a tag to compare

• Fixes an issue for developers that add the iOS SDK to their projects using cocoapods instead of using Xcode sub-projects

3.1.0

22 Feb 01:55
a037801
Compare
Choose a tag to compare

• Adds Email to the react-native SDK
• Fixes setLogLevel() in the Android target
• Switches to a subclass of RCTEventEmitter for the iOS target