-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Remove deprecated token callback #1074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a question and a nit. Other than that LGTM
Firebase/Messaging/FIRMessaging.m
Outdated
@@ -572,18 +572,16 @@ - (void)setDelegate:(id<FIRMessagingDelegate>)delegate { | |||
[self validateDelegateConformsToTokenAvailabilityMethods]; | |||
} | |||
|
|||
// Check if the delegate conforms to either |didReceiveRegistrationToken:| or | |||
// |didRefreshRegistrationToken:|, and display a warning to the developer if not. | |||
// Check if the delegate conforms to either |didReceiveRegistrationToken:|, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove either
Optionally, the comma at the end of the line can be removed too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
__deprecated_msg("Please use messaging:didReceiveRegistrationToken:, which is called for both \ | ||
current and refreshed tokens."); | ||
NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:)) | ||
__IOS_AVAILABLE(10.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a lower iOS version? If this method isn't available, then will iOS 9 and lower systems have no way of receiving token updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, why is this iOS 10+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this should be universal. For some reason, the protocol is commented to support iOS 10+ but this method somehow doesn't, so I should remove the support commend in protocol to avoid confusion.
FIRMessagingLoggerWarn(kFIRMessagingMessageCodeTokenDelegateMethodsNotImplemented, | ||
@"The object %@ does not respond to " | ||
@"-messaging:didReceiveRegistrationToken:, nor " | ||
@"-messaging:didRefreshRegistrationToken:. Please implement " | ||
@"-messaging:didReceiveRegistrationToken:. Please implement " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: While we're making this change, we should change to the Swift signature to match (almost) all of our other logs and documentation: messaging(_:didReceiveRegistrationToken:)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I will notify the doc team on the change during launch.
I believe all the public doc is using the recommended API (objc & swift), also I've checked all source code the deprecated methods have been removed. Let me know if there's anything you think might be missing.
__deprecated_msg("Please use messaging:didReceiveRegistrationToken:, which is called for both \ | ||
current and refreshed tokens."); | ||
NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:)) | ||
__IOS_AVAILABLE(10.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, why is this iOS 10+?
Done. Removed the unnecessary iOS 10 only label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The deprecated token callback has been replaced by messaging:didReceiveRegistrationToken:.