Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Alexis Bauchu · Mar 05, 2019 at 01:24 AM · Push Notifications

How to make Apple Push Notifications work in TestFlight builds,Push Notifications won't work in TestFlight builds

Hello,

I'd like to know if anyone has problems testing Apple Push Notifications with TestFlight builds.

I've followed "Push Notifications basics" and "Push Notifications for iOS" tutorials, and I can successfully send push notifications from the PlayFab dashboard to a specific user who has a direct XCode build.

So this means that certificates are ok (sandbox), user registration is ok (they send to PlayFab sandbox tokens, if I trust the player profile in PlayFab). As far as I know, this is the only difference: a device with a XCode build will receive push notifications, a TestFlight one will not...

Can anyone help me troubleshoot this please?

,

Hello,

I'd like to know if anyone has problems testing Apple Push Notifications with TestFlight builds.

I've followed "Push Notifications basics" and "Push Notifications for iOS" tutorials, and I can successfully send push notifications from the PlayFab dashboard to a specific users who has a direct XCode build.

So this means that certificates are ok (sandbox), user registration is ok (they send to PlayFab sandbox tokens, if I trust the player profile in PlayFab). The difference is a device with a XCode build will receive push notifications, a TestFlight one will not...

Can anyone help me troubleshoot this please?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Hernando · Mar 05, 2019 at 07:39 AM

I'm not familiar with iOS development, but after I searched, I got some results that might help you.

When you install via Xcode directly such as you are testing a development build in house. The certificate came from the sandbox environment, you need to send the push notifications through the development URL and provider a development certificate generated (or an authentication token), and you can't send it to the production push service.

Similar to this, Anything installed via TestFlight or App Store needs to be sent through the production URL and provider a production certificate generated (or an authentication token). And if you do send a device certificate to the wrong environment, the push service will see that as an invalid certificate and discard the notification.

reference linking:

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns

https://developer.apple.com/library/archive/technotes/tn2265/_index.html

Besides, this is not a Playfab-side issue hence you can get more help from Apple Developer Forums.

Comment
Alexis Bauchu

People who like this

1 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Alexis Bauchu · Mar 13, 2019 at 02:33 AM 0
Share

Thanks you very much. I changed the .pem pushed to PlayFab for a production one. This solved my issue with TestFlight builds. I mistakenly thought device tokens had a "sandbox" in their string, but this was part of the URL used to send the notifications (due to the sandbox .pem uploaded to PlayFab).


On a side note, I used Fastlane to produce and download the .pem file, but apparently it won't produce a file other than sandbox, even with a "--production" option. Bug? I don't know yet, but I had to do it the old way, on the Apple developer portal.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Is it possible to store the content of a push notification in title player account? 1 Answer

    Push notification scheduling not working? 3 Answers

    Scheduled notifications - How to call 1 Answer

    Sending data messages 1 Answer

    PlayFab Push Notification Question 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges