-
Notifications
You must be signed in to change notification settings - Fork 25
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
Umbrella issue for the Apple location push related functionality across different repositaries #1763
Comments
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3643 |
https://ably.com/docs/api/rest-api#post-device-registration
I would suggest instead of "transportType" to use "apns" (or "fcm") dictionary. It will help to eliminate potential problems if you need to change something on one platform, and not to mess up with the other.
Device tokens are different, as well as API used for their obtain. Keys in the "deviceTokens" (plural) are values from Apple's documentation for "apns-push-type" header field: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns |
I think the idea of being able to specify a separate token to be used for a specific push type is a sensible one.
Could you please elaborate on what scenario you're suggesting this helps us avoid, @maratal? A device registration applies to a single device and hence a single platform (note the top-level |
I've meant having keys for different platforms in one dictionary is probably not the best recipe to handle on the server, but someone from a server side team can have a different opinion on it @lawrence-forooghian |
So just to clarify, for each different type of Certainly changing the API completely might be quite difficult at the backend, especially because we would need to handle both types for ongoing support. |
Correct. All those tokens come from different iOS frameworks.
Agree, what about adding just one extra token to speed up process and then think of more neat solution? @Peter-Kubik @lawrence-forooghian |
@maratal Yeah, I think adding |
At least it's what Apple says here @Peter-Kubik |
@stmoreau @lawrence-forooghian WDYT of adding just one additional token for simplicity? |
@Peter-Kubik Some more information on how to handle device tokens here:
Also see https://developer.apple.com/documentation/pushkit/pkpushtype-swift.struct |
@maratal I have talked to Paddy, and he said that for now, we should do the bare minimum to support the new feature of the GM app, which will require location push notification, so I think for now just sending the location token is fine. Also, thanks for the docs! |
Would you be able to read this dictionary? Where "deviceToken" is an old token, and "deviceTokens" (plural) - is the new one? You just read it like
I mean it's two different dictionaries - one without "deviceTokens" is sent by old clients and with "deviceTokens" (but without "deviceToken" (singular)) by the new ones. @Peter-Kubik |
@maratal I don't think it would be an issue. I am just cautious of the very small difference in the name |
Yes, but as I've mentioned above, not in the same request. |
Ah, I got you. I think if we were to do it this way, we should consider maybe |
Yeah, it's less confusing this way, will do. |
Apple article on how to implement location pushes:
https://developer.apple.com/documentation/corelocation/creating_a_location_push_service_extension
ably-cocoa
: #1762Server:
a) In addition to "push.recipient.deviceToken", "push.recipient.locationDeviceToken" should be read from client's request and saved.
b) Implement sending location push according to https://developer.apple.com/documentation/corelocation/creating_a_location_push_service_extension#3875733 and https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
Docs:
Specs:
┆Issue is synchronized with this Jira Task by Unito
The text was updated successfully, but these errors were encountered: