Skip to content

Commit

Permalink
fix(messaging, ios): resolve getAPNSToken promise in all cases
Browse files Browse the repository at this point in the history
Fixes #7272 with thanks to @appa-gomi !
  • Loading branch information
mikehardy committed Feb 8, 2024
1 parent 73ca3d5 commit b30eee1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ - (NSDictionary *)constantsToExport {
resolve([NSNull null]);
return;
#endif
DLog(@"RNFBMessaging getAPNSToken - ARM64 Simulator detected, but no APNS token set. Assuming "
@"APNS token is possible. macOS13+ / iOS16+ / M1 mac required for assumption to be valid. "
DLog(@"RNFBMessaging getAPNSToken - ARM64 Simulator detected, but no APNS token available. "
@"APNS token may be possible. macOS13+ / iOS16+ / M1 mac required for assumption to be "
@"valid. "
@"Use setAPNSToken in testing if needed.");
#endif
if ([UIApplication sharedApplication].isRegisteredForRemoteNotifications == NO) {
Expand All @@ -188,6 +189,7 @@ - (NSDictionary *)constantsToExport {
}];
return;
}
resolve([NSNull null]);
}
}

Expand Down

1 comment on commit b30eee1

@ajaysubra
Copy link

@ajaysubra ajaysubra commented on b30eee1 May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikehardy we are seeing some difference in the case of our APNs tokens between versions 18.8 and 18.9. Specifically our app on the older version the apns token in lower case where as the newer one has it in upper case. I was not able to find any code related to this change but you commit message here resolve getAPNSToken promise in all cases peaked my interest. Please let me know if you are aware of any change that would cause this? Thanks!

Please sign in to comment.