@@ -240,14 +240,14 @@ + (id)initWithLaunchOptions:(NSDictionary*)launchOptions appId:(NSString*)appId
240240
241241 if (mUserId != nil )
242242 [self registerUser ];
243- else // Fall back incase Apple does not responsed in time.
243+ else // Fall back in case Apple does not responds in time.
244244 [self performSelector: @selector (registerUser ) withObject: nil afterDelay: 30 .0f ];
245245
246246 [OneSignalTracker onFocus: NO ];
247247 }
248248
249249 /*
250- * No need to call the handleNotificationOpened:userInfo as it will be called from one of the folloing selectors
250+ * No need to call the handleNotificationOpened:userInfo as it will be called from one of the following selectors
251251 * - application:didReceiveRemoteNotification:fetchCompletionHandler
252252 * - userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler (iOS10)
253253 */
@@ -627,8 +627,8 @@ + (void)updateDeviceToken:(NSString*)deviceToken onSuccess:(OSResultSuccessBlock
627627 tokenUpdateSuccessBlock = successBlock;
628628 tokenUpdateFailureBlock = failureBlock;
629629
630- // iOS 8 - We get a token right away but give the user 30 sec to responsed to the system prompt.
631- // Also check notifiation types so there is no waiting if user has already answered the system prompt.
630+ // iOS 8 - We get a token right away but give the user 30 sec to respond to the system prompt.
631+ // Also check notification types so there is no waiting if user has already answered the system prompt.
632632 // The goal is to only have 1 server call.
633633 if ([OneSignalHelper isCapableOfGettingNotificationTypes ] && [[UIApplication sharedApplication ] currentUserNotificationSettings ].types == 0 ) {
634634 [NSObject cancelPreviousPerformRequestsWithTarget: self selector: @selector (registerUser ) object: nil ];
@@ -819,7 +819,7 @@ + (void)registerUser {
819819 waitingForOneSReg = false ;
820820 [OneSignal onesignal_Log: ONE_S_LL_ERROR message: [NSString stringWithFormat: @" Error registering with OneSignal: %@ " , error]];
821821
822- // If the failed regiatration is priority, force the next one to be a high priority
822+ // If the failed registration is priority, force the next one to be a high priority
823823 nextRegistrationIsHighPriority = YES ;
824824 }];
825825}
@@ -945,7 +945,7 @@ + (void)notificationOpened:(NSDictionary*)messageDict isActive:(BOOL)isActive {
945945 // Call Received Block
946946 [OneSignalHelper handleNotificationReceived: iaaoption];
947947
948- // Notify backend that user opened the notifiation
948+ // Notify backend that user opened the notification
949949 NSString * messageId = [customDict objectForKey: @" i" ];
950950 [OneSignal submitNotificationOpened: messageId];
951951 }
@@ -994,7 +994,7 @@ + (void) handleNotificationOpened:(NSDictionary*)messageDict isActive:(BOOL)isAc
994994 if (customDict == nil )
995995 customDict = [messageDict objectForKey: @" custom" ];
996996
997- // Notify backend that user opened the notifiation
997+ // Notify backend that user opened the notification
998998 NSString * messageId = [customDict objectForKey: @" i" ];
999999 [OneSignal submitNotificationOpened: messageId];
10001000
@@ -1019,8 +1019,8 @@ + (void)launchWebURL:(NSString*)openUrl {
10191019
10201020 if (openUrl && [OneSignalHelper verifyURL: openUrl]) {
10211021 NSURL *url = [NSURL URLWithString: openUrl];
1022- // Give the app resume animation time to finish when tapping on a notificaion from the notificaiton center.
1023- // Isn't a requiremnt but improves visual flow.
1022+ // Give the app resume animation time to finish when tapping on a notification from the notification center.
1023+ // Isn't a requirement but improves visual flow.
10241024 [OneSignalHelper performSelector: @selector (displayWebView: ) withObject: url afterDelay: 0.5 ];
10251025 }
10261026
@@ -1063,9 +1063,9 @@ + (BOOL) clearBadgeCount:(BOOL)fromNotifOpened {
10631063 bool wasBadgeSet = [UIApplication sharedApplication ].applicationIconBadgeNumber > 0 ;
10641064
10651065 if ((!(NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1) && fromNotifOpened) || wasBadgeSet) {
1066- // Clear badges and nofiications from this app.
1066+ // Clear badges and notifications from this app.
10671067 // Setting to 1 then 0 was needed to clear the notifications on iOS 6 & 7. (Otherwise you can click the notification multiple times.)
1068- // iOS 8+ auto dismisses the notificaiton you tap on so only clear the badge (and notifications [side-effect]) if it was set.
1068+ // iOS 8+ auto dismisses the notification you tap on so only clear the badge (and notifications [side-effect]) if it was set.
10691069 [[UIApplication sharedApplication ] setApplicationIconBadgeNumber: 1 ];
10701070 [[UIApplication sharedApplication ] setApplicationIconBadgeNumber: 0 ];
10711071 }
@@ -1133,7 +1133,7 @@ + (BOOL) remoteSilentNotification:(UIApplication*)application UserInfo:(NSDictio
11331133 if (userInfo[@" os_data" ][@" buttons" ] || userInfo[@" at" ] || userInfo[@" o" ])
11341134 data = userInfo;
11351135
1136- // Genergate local notification for action button and/or attachments.
1136+ // Generate local notification for action button and/or attachments.
11371137 if (data) {
11381138 if (NSClassFromString (@" UNUserNotificationCenter" )) {
11391139 startedBackgroundJob = true ;
@@ -1166,7 +1166,7 @@ + (BOOL) remoteSilentNotification:(UIApplication*)application UserInfo:(NSDictio
11661166 return startedBackgroundJob;
11671167}
11681168
1169- // iOS 8-9 - Entry point when OneSignal action button notifiation is displayed or opened.
1169+ // iOS 8-9 - Entry point when OneSignal action button notification is displayed or opened.
11701170+ (void )processLocalActionBasedNotification : (UILocalNotification*) notification identifier : (NSString *)identifier {
11711171 if (notification.userInfo ) {
11721172
@@ -1232,9 +1232,9 @@ + (void)syncHashedEmail:(NSString *)email {
12321232// - For iOS 10 only, swizzle all UNUserNotificationCenterDelegate selectors on the passed in class.
12331233// - This may or may not be set so we set our own now in registerAsUNNotificationCenterDelegate to an empty class.
12341234//
1235- // Note1: Do NOT move this category to it's own file. This is requried so when the app developer calls OneSignal.initWithLaunchOptions this load+
1235+ // Note1: Do NOT move this category to it's own file. This is required so when the app developer calls OneSignal.initWithLaunchOptions this load+
12361236// will fire along with it. This is due to how iOS loads .m files into memory instead of classes.
1237- // Note2: Do NOT directly add swizzled selectors to this category as if this class is loaded into the runtime twice unexpected results will orcur .
1237+ // Note2: Do NOT directly add swizzled selectors to this category as if this class is loaded into the runtime twice unexpected results will occur .
12381238// The oneSignalLoadedTagSelector: selector is used a flag to prevent double swizzling if this library is loaded twice.
12391239@implementation UIApplication (OneSignal)
12401240#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO (v ) ([[[UIDevice currentDevice ] systemVersion ] compare: v options: NSNumericSearch] != NSOrderedDescending)
0 commit comments