Skip to content

Commit 9095f5a

Browse files
committed
Release commit 4.1.0
* Update Android version to 4.4.1 * Update iOS Version to 3.5.3 * Update Notification Service method
1 parent 2e390bc commit 9095f5a

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929

3030
// api is used instead of implementation so the parent :app project can access any of the OneSignal Java
3131
// classes if needed. Such as com.onesignal.NotificationExtenderService
32-
api 'com.onesignal:OneSignal:4.4.0'
32+
api 'com.onesignal:OneSignal:4.4.1'
3333

3434
testImplementation 'junit:junit:4.12'
3535
}

examples/RNOneSignalTS/ios/OneSignalNotificationServiceExtension/NotificationService.m

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,7 @@ - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withConte
1717
self.contentHandler = contentHandler;
1818
self.bestAttemptContent = [request.content mutableCopy];
1919

20-
[OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent];
21-
22-
// DEBUGGING: Uncomment the 2 lines below and comment out the one above to ensure this extension is excuting
23-
// Note, this extension only runs when mutable-content is set
24-
// Setting an attachment or action buttons automatically adds this
25-
// NSLog(@"Running NotificationServiceExtension");
26-
// self.bestAttemptContent.body = [@"[Modified] " stringByAppendingString:self.bestAttemptContent.body];
27-
28-
self.contentHandler(self.bestAttemptContent);
20+
[OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent withContentHandler:self.contentHandler];
2921
}
3022

3123
- (void)serviceExtensionTimeWillExpire {

examples/RNOneSignalTS/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": {
1313
"react": "16.13.1",
1414
"react-native": "0.64.1",
15-
"react-native-onesignal": "4.1.1"
15+
"react-native-onesignal": "4.2.0"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.8.4",

ios/RCTOneSignal/RCTOneSignal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#define INIT_DEPRECATION_NOTICE "Objective-C Initialization of the OneSignal SDK has been deprecated. Use JavaScript init instead."
99

10-
@interface RCTOneSignal : NSObject <OSSubscriptionObserver, OSEmailSubscriptionObserver, OSPermissionObserver>
10+
@interface RCTOneSignal : NSObject <OSSubscriptionObserver, OSEmailSubscriptionObserver, OSPermissionObserver, OSSMSSubscriptionObserver>
1111

1212
+ (RCTOneSignal *) sharedInstance;
1313

ios/RCTOneSignal/RCTOneSignalExtensionService.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
@interface RCTOneSignalExtensionService : NSObject
55
+ (void)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest * _Nonnull)request withMutableNotificationContent:(UNMutableNotificationContent * _Nullable)content;
66
+ (void)didReceiveNotificationRequest:(UNNotificationRequest * _Nonnull)request withContent:(UNMutableNotificationContent * _Nullable)content;
7+
+ (void)didReceiveNotificationRequest:(UNNotificationRequest * _Nonnull)request withContent:(UNMutableNotificationContent * _Nullable)content withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler;
78
@end

ios/RCTOneSignal/RCTOneSignalExtensionService.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ +(void)didReceiveNotificationRequest:(UNNotificationRequest *)request withConten
1313
[OneSignal didReceiveNotificationExtensionRequest:request withMutableNotificationContent:content];
1414
}
1515

16+
+ (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContent:(UNMutableNotificationContent* _Nullable)content withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler {
17+
[OneSignal didReceiveNotificationExtensionRequest:request withMutableNotificationContent:content withContentHandler:contentHandler];
18+
}
19+
1620
+(void)serviceExtensionTimeWillExpireRequest:(UNNotificationRequest *)request withMutableNotificationContent:(UNMutableNotificationContent * _Nullable)content {
1721
[OneSignal serviceExtensionTimeWillExpireRequest:request withMutableNotificationContent:content];
1822
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-onesignal",
3-
"version": "4.1.1",
3+
"version": "4.2.0",
44
"description": "React Native OneSignal SDK",
55
"main": "src/index",
66
"typings": "src/index.d.ts",

react-native-onesignal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Pod::Spec.new do |s|
2222
# pod 'React', :path => '../node_modules/react-native/'
2323

2424
# The Native OneSignal-iOS-SDK XCFramework from cocoapods.
25-
s.dependency 'OneSignalXCFramework', '3.4.4'
25+
s.dependency 'OneSignalXCFramework', '3.5.3'
2626
end

0 commit comments

Comments
 (0)