From 69856b5a88f1642d86abc6d0061db5eb388973a3 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Wed, 26 Jan 2022 17:46:45 -0600 Subject: [PATCH 1/3] Add previously missing iOS function --- ios/RCTOneSignal/RCTOneSignalEventEmitter.m | 4 ++++ src/index.ts | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/ios/RCTOneSignal/RCTOneSignalEventEmitter.m b/ios/RCTOneSignal/RCTOneSignalEventEmitter.m index a65dbe63..bc8f1fd7 100644 --- a/ios/RCTOneSignal/RCTOneSignalEventEmitter.m +++ b/ios/RCTOneSignal/RCTOneSignalEventEmitter.m @@ -394,6 +394,10 @@ + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body { }]; } +RCT_EXPORT_METHOD(setLaunchURLsInApp:(BOOL)isEnabled) { + [OneSignal setLaunchURLsInApp:isEnabled]; +} + RCT_EXPORT_METHOD(setLogLevel:(int)logLevel visualLogLevel:(int)visualLogLevel) { [OneSignal setLogLevel:logLevel visualLevel:visualLogLevel]; } diff --git a/src/index.ts b/src/index.ts index 4d942412..f4b65f9c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -505,6 +505,21 @@ export default class OneSignal { } } + /** + * This method can be used to set if launch URLs should be opened in safari or within the application. + * @param {boolean} isEnabled + * @returns + */ + static setLaunchURLsInApp(isEnabled: boolean): void { + if (!isNativeModuleLoaded(RNOneSignal)) return; + + if (Platform.OS === 'ios') { + RNOneSignal.setLaunchURLsInApp(isEnabled); + } else { + console.log("setLaunchURLsInApp: this function is not supported on Android"); + } + } + /* E X T E R N A L U S E R I D */ /** From 228b00263e0bbb6f3993f68684d1ca33019bf2d5 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 31 Jan 2022 13:23:00 -0600 Subject: [PATCH 2/3] Update native Android version used Update to 4.6.6 --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 80155446..1f884d0f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -29,7 +29,7 @@ dependencies { // api is used instead of implementation so the parent :app project can access any of the OneSignal Java // classes if needed. Such as com.onesignal.NotificationExtenderService - api 'com.onesignal:OneSignal:4.6.5' + api 'com.onesignal:OneSignal:4.6.6' testImplementation 'junit:junit:4.12' } From 4c6952a962204b99ab16b72857e174360217efca Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Mon, 31 Jan 2022 13:24:01 -0600 Subject: [PATCH 3/3] 4.3.6 Release Commit Update version number to 4.3.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dd8646c5..981f79dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-onesignal", - "version": "4.3.5", + "version": "4.3.6", "description": "React Native OneSignal SDK", "main": "dist/index.js", "types": "dist/index.d.ts",