question

Trung Dong avatar image
Trung Dong asked

Push Notification are not set up (iOS)

I follow the tutorial step by step and got the log "Push Registration Successful", as this doc says:

https://docs.microsoft.com/en-us/gaming/playfab/features/engagement/push-notifications/push-notifications-for-ios

But in the Title Player Account, it said: "Push notifications are not set up."

When I use a Cloud Script to test the Push Notification: (my test user Playfab ID is A84D37DA116A478)

server.SendPushNotification({"Recipient" : "A84D37DA116A478", "Message" : "This is a test messeage. Please ignore it!", "Subject" : "A test message"});

The test failed, my device did not get any notification. Here is the response log:

{"Data":{"api":"/Server/SendPushNotification","request":{"Recipient":"A84D37DA116A478","Message":"This is a test messeage. Please ignore it!","Subject":"A test message"},"result":null,"apiError":{"code":400,"status":"BadRequest","retryAfterSeconds":null,"error":"PushNotEnabledForAccount","errorCode":1094,"errorMessage":"PushNotEnabledForAccount","errorHash":null,"errorDetails":null}},"Level":"Error","Message":"PlayFab API request error"}

Does anyone know how to solve this? This is the response I got after called PlayFabClientAPI.RegisterForIOSPushNotification. Hope this can provide more details about the bug.

{"Request":{"ConfirmationMessage":null,"DeviceToken":"d1e3ec554b4211b2ce2adf2c0d47c8d7201318762712a12d6b96c76abb5e23f4","SendPushNotificationConfirmation":null,"AuthenticationContext":null},"CustomData":null}
Push Notifications
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Trung Dong avatar image Trung Dong commented ·

P/s: I have completed the Push Notifications settings of the Title, and it is currently Active.

The XCode project also have capability for Remote Push Notification.

0 Likes 0 ·

1 Answer

·
Trung Dong avatar image
Trung Dong answered

I have found the cause!

It seems you can not register to Push Notification if logged in as a guest. You need to log in by Facebook or Playfab account etc.

This note should be in the tutorial. It cost me a whole day to find out :(

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.