|
59 | 59 | #define ERROR_PUSH_DELEGATE_NEVER_FIRED -14 |
60 | 60 | #define ERROR_PUSH_SIMULATOR_NOT_SUPPORTED -15 |
61 | 61 | #define ERROR_PUSH_UNKOWN_APNS_ERROR -16 |
| 62 | +#define ERROR_PUSH_OTHER_3000_ERROR -17 |
62 | 63 |
|
63 | 64 | #pragma clang diagnostic push |
64 | 65 | #pragma clang diagnostic ignored "-Wundeclared-selector" |
@@ -555,10 +556,16 @@ + (void) promptLocation { |
555 | 556 | + (void) handleDidFailRegisterForRemoteNotification:(NSError*)err { |
556 | 557 | waitingForApnsResponse = false; |
557 | 558 |
|
558 | | - if (err.code == 3000 && [((NSString*)[err.userInfo objectForKey:NSLocalizedDescriptionKey]) rangeOfString:@"no valid 'aps-environment'"].location != NSNotFound) { |
559 | | - // User did not enable push notification capability |
560 | | - [OneSignal setSubscriptionStatus:ERROR_PUSH_CAPABLILITY_DISABLED]; |
561 | | - [OneSignal onesignal_Log:ONE_S_LL_ERROR message:@"ERROR! 'Push Notification' capability not turned on! Enable it in Xcode under 'Project Target' -> Capability."]; |
| 559 | + if (err.code == 3000) { |
| 560 | + if ([((NSString*)[err.userInfo objectForKey:NSLocalizedDescriptionKey]) rangeOfString:@"no valid 'aps-environment'"].location != NSNotFound) { |
| 561 | + // User did not enable push notification capability |
| 562 | + [OneSignal setSubscriptionStatus:ERROR_PUSH_CAPABLILITY_DISABLED]; |
| 563 | + [OneSignal onesignal_Log:ONE_S_LL_ERROR message:@"ERROR! 'Push Notification' capability not turned on! Enable it in Xcode under 'Project Target' -> Capability."]; |
| 564 | + } |
| 565 | + else { |
| 566 | + [OneSignal setSubscriptionStatus:ERROR_PUSH_OTHER_3000_ERROR]; |
| 567 | + [OneSignal onesignal_Log:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"ERROR! Unkown 3000 error returned from APNs when getting a push token: %@", err]]; |
| 568 | + } |
562 | 569 | } |
563 | 570 | else if (err.code == 3010) { |
564 | 571 | [OneSignal setSubscriptionStatus:ERROR_PUSH_SIMULATOR_NOT_SUPPORTED]; |
|
0 commit comments