-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Messaging Token API for review #6313
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.
LGTM
After running the script/style.sh, the swift interface changes from If I rename something like deleteBlahBlah(completion:), clang format won't format it with a space after that, which has no warning in xcode. However, I do prefer to use deleteWithCompletion: to be consistent with FIS: https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h#L116 I can't ignore the format as it won't pass presubmit. |
/** | ||
* Asynchronously getting the default FCM registration token. | ||
* | ||
* This creates a Firebase Installations ID, if one does not exist, and sends information |
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.
How does the Installations ID relate to the FCM registration token?
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.
Actually I just realize this call doesn't necessarily creates a FID, FID is always existed in the client. @gsakakihara
So I don't think we need to state here what FID's impact on user info collecting, but we should mention the registration token's impact on this.
@andirayo @egilmorez
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.
Looks like FIS has changed to not auto generated anymore #5656 to keep consistent behavior between android and iOS. The installations ID is only created if some product or developers request it.
See https://github.com/nicklockwood/SwiftFormat#:~:text=You%20can%20disable%20rules%20for,...%5D%5D for disabling swiftformat in local areas. Interested in @ryanwilson's perspective on this. |
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.
Some style things for you, thanks!
…e swift API in comments
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.
Thanks Chen!
@@ -221,7 +221,7 @@ struct ContentView: View { | |||
} | |||
|
|||
func deleteFCM() { | |||
Messaging.messaging().delete { error in | |||
Messaging.messaging().deleteData { error in |
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.
@ryanwilson After renaming, the swift API calls it deleteData, does that look good to you? or I should rename swift API to deleteMessagingData as well?
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.
This looks good to me - thanks!
Adding new getToken and deleteToken API in Messaging so we can migrate users to start using them to handle FCM registration token instead of using InstanceID.
Also add a new deleteWithCompletion: method for GDPR delete to replace InstanceID.delete. This method deletes all the tokens and checkin data that FIS.deleteWithCompletion: doesn't do. Developers should call both to handle GDPR delete for messaging.
minor: