Skip to content

Commit 01b9851

Browse files
committed
Updated method name in example for 2.4.2 release
* Also fixed typo in receivedRequest in the example.
1 parent 910587e commit 01b9851

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Examples/ObjectiveCExample/NotificationServiceExtension/NotificationService.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
@interface NotificationService ()
3333

3434
@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
35-
@property (nonatomic, strong) UNNotificationRequest *recievedRequest;
35+
@property (nonatomic, strong) UNNotificationRequest *receivedRequest;
3636
@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
3737

3838
@end
3939

4040
@implementation NotificationService
4141

4242
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
43-
self.recievedRequest = request;
43+
self.receivedRequest = request;
4444
self.contentHandler = contentHandler;
4545
self.bestAttemptContent = [request.content mutableCopy];
4646

47-
[OneSignal didReceiveNotificatioExtensionnRequest:self.recievedRequest withMutableNotificationContent:self.bestAttemptContent];
47+
[OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent];
4848

4949
self.contentHandler(self.bestAttemptContent);
5050
}
@@ -53,7 +53,7 @@ - (void)serviceExtensionTimeWillExpire {
5353
// Called just before the extension will be terminated by the system.
5454
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
5555

56-
[OneSignal serviceExtensionTimeWillExpireRequest:self.recievedRequest withMutableNotificationContent:self.bestAttemptContent];
56+
[OneSignal serviceExtensionTimeWillExpireRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent];
5757

5858
self.contentHandler(self.bestAttemptContent);
5959
}

Examples/SwiftExample/OneSignalNotificationServiceExtension/NotificationService.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ import OneSignal
3333
class NotificationService: UNNotificationServiceExtension {
3434

3535
var contentHandler: ((UNNotificationContent) -> Void)?
36-
var recievedRequest: UNNotificationRequest!
36+
var receivedRequest: UNNotificationRequest!
3737
var bestAttemptContent: UNMutableNotificationContent?
3838

3939
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
40-
self.recievedRequest = request;
40+
self.receivedRequest = request;
4141
self.contentHandler = contentHandler
4242
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
4343

4444
if let bestAttemptContent = bestAttemptContent {
45-
OneSignal.didReceiveNotificatioExtensionnRequest(self.recievedRequest, with: self.bestAttemptContent)
45+
OneSignal.didReceiveNotificationExtensionRequest(self.receivedRequest, with: self.bestAttemptContent)
4646
contentHandler(bestAttemptContent)
4747
}
4848
}
@@ -51,7 +51,7 @@ class NotificationService: UNNotificationServiceExtension {
5151
// Called just before the extension will be terminated by the system.
5252
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
5353
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
54-
OneSignal.serviceExtensionTimeWillExpireRequest(self.recievedRequest, with: self.bestAttemptContent)
54+
OneSignal.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent)
5555
contentHandler(bestAttemptContent)
5656
}
5757
}

0 commit comments

Comments
 (0)