Skip to:
An iOS application needs two device tokens for receiving push notifications:
one device token for VoIP push notifications (PushKit)
one device token for text alert push notifications (UserNotification)
Currently, wazo-auth POST /users/{user_uuid}/external/mobile only provides one apns_token.
POST /users/{user_uuid}/external/mobile
apns_token
Thus POST /users/{user_uuid}/external/mobile must provide another field for both push notifications to work.
Fields used in POST /users/{user_uuid}/external/mobile :
Old application on old Stack: token + apns_token
token
Old application on new Stack: token + apns_token
New application on old Stack: token + apns_token + apns_voip_token(ignored) +apns_notification_token(ignored)
apns_voip_token
apns_notification_token
New application on new Stack: token + apns_token + apns_voip_token +apns_notification_token
As a consequence, the backend API must accept all 4 fields until the older versions of the iOS app are not supported anymore.
When an old application is upgraded:
GET /users/{user_uuid}/external/mobile
If apns_voip_token and apns_notification_token do not exist
Remove old tokens DELETE /users/{user_uuid}/external/mobile (necessary to avoid 409 Conflict)
DELETE /users/{user_uuid}/external/mobile
Create the new tokens with POST /users/{user_uuid}/external/mobile
An iOS application needs two device tokens for receiving push notifications:
one device token for VoIP push notifications (PushKit)
one device token for text alert push notifications (UserNotification)
Currently, wazo-auth
POST /users/{user_uuid}/external/mobile
only provides oneapns_token
.Thus
POST /users/{user_uuid}/external/mobile
must provide another field for both push notifications to work.Specification
Upgrade procedure
Fields used in
POST /users/{user_uuid}/external/mobile
:Old application on old Stack:
token
+apns_token
Old application on new Stack:
token
+apns_token
New application on old Stack:
token
+apns_token
+apns_voip_token
(ignored) +apns_notification_token
(ignored)New application on new Stack:
token
+apns_token
+apns_voip_token
+apns_notification_token
As a consequence, the backend API must accept all 4 fields until the older versions of the iOS app are not supported anymore.
When an old application is upgraded:
GET /users/{user_uuid}/external/mobile
If
apns_voip_token
andapns_notification_token
do not existRemove old tokens
DELETE /users/{user_uuid}/external/mobile
(necessary to avoid 409 Conflict)Create the new tokens with
POST /users/{user_uuid}/external/mobile