question

digitallead avatar image
digitallead asked

Push Notifications are not working for my Title

For my title, I can't seem to get Push Notifications working, My Title is 35AD, which was an older title before the upgrade to Firebase for Google. I've uploaded my .pem file that works for OneSignal a couple of times now. I can get users registered, but when I try to send a push notification, it fails and then all subsequent pushes say that the client has been unregistered for Push Notifications.

Is there something that got messed up on the upgrade?

Push Notifications
10 |1200

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

1 Answer

·
JayZuo avatar image
JayZuo answered

To setup PlayFab's push notification service, please see Push Notifications for Android. As Google has deprecated GCM, you'd better import your project into the Firebase Console. And then follow the steps in the document to find the server API-Key and use it in PlayFab. Once set up properly, you should see ARN in the Game Manager UI Settings (for your title) > Push Notifications > Android.

For now, PlayFab takes advantage of Amazon SNS to implement cross-platform message routing. OneSignal is not supported and there should be no need to uploaded .pem file.

10 comments
10 |1200

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

digitallead avatar image digitallead commented ·

@JayZuo I'm confused. Are you saying that I need to use Firebase for BOTH iOS and Android? I've checked all of the forum and API docs, and I haven't seen that.

What I've seen in Push Notifications for iOS is that I had to use Apple's native services, and makes no reference to Firebase. My point about OneSignal and the .pem file I created wasn't that PlayFab had integration with OneSignal, but I knew that the certificate worked with OneSignal, so it should be valid to upload to PlayFab for iOS Push Notifications.

Also, from trying to debug this in the forums, (specifically FCM ios push notifications aren't working (android does) for Unity) what I've seen is that the Firebase plugin causes compatibility issues with Push Notifications for iOS. I haven't seen anything in the forums that Firebase is the solution for both iOS and Android.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ digitallead commented ·

Sorry, as you've mentioned Firebase and Google, I was thought you are going to implement push notifications for Android. For iOS, as you've seen, you can just use Unity for iOS, it does not require a plugin for basic push messages.

0 Likes 0 ·
digitallead avatar image digitallead commented ·

@JayZuo no worries. To clarify, this is my current situation:

I have an older Title that needed upgrading the Push Notifications system to utilize Firebase for Google. I did that for my title, we had not implemented Push Notifications prior to this.

I installed Firebase in my project, not realizing there were conflicts with iOS. I added everything I needed in CloudScript to implement Push Notifications for my game (new private message, invites to games, etc.)

I tested all this on an iOS device. I could recognize that I had registered for Push Notifications in PlayFab, but no push notifications would be be received on the device.

Perusing the forums, I found the link I posted that there is compatibility issues with FCM, iOS, and PlayFab, so I tried removing Firebase from the game to get iOS Push Notifications at all, and even then, I'm getting the same problems.

So I need help from one of the admins as to what is going that is preventing iOS Push Notifications from working, and then is seems like some people have figured out how to work around this compatibility issue, but there doesn't seem to be a full solution push somewhere, it seems to be just in pieces.

Clear as mud?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ digitallead commented ·

As @Brendan has said in this reply: https://community.playfab.com/comments/16798/view.html. For now, it's recommended either having two projects - one for iOS and one for Android, or else using https://fcm.googleapis.com/fcm/send in Cloud Script for your Push messages.

0 Likes 0 ·
digitallead avatar image digitallead JayZuo ♦ commented ·

My question with using Firebase for both is how would I get the DeviceToken from PlayFab. I see from Cloudscript http.request to Firebase fails that you have to provide the Device Token, but I don't see where in the PlayFab API that I can get that from the service?

0 Likes 0 ·
Show more comments
Show more comments

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.