How to test Push Notifications on the production environment for a macOS app?

Viewed 219

I want to test my app on the production APNS environment to make sure Push notifications work correctly in production.

Normally, on iOS, i would do this using the adhoc provisioning profile which allows me to set the com.apple.developer.aps-environment with the production value.

However, on macOS this type of provisioning profile does not exist, so the only way to test the production environment that i can think of is via testflight.

Is there a way to test Push Notifications on prod environment for a macOS app without using testflight?

1 Answers

macOS can use Ad Hoc provisioning profiles too, but maybe I am misunderstanding something in your question.

In any case, you can certainly test in a production environment without TestFlight—because it's macOS, you can distribute the app any way you choose.

For example, you could use a Developer ID certificate to sign an app that will run without warnings outside the App Store. So you could export a Developer ID version of your app and test yourself. Since a Developer ID app is a production environment, Xcode will automatically set the push notification to production when it re-signs the app: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_aps-environment?language=objc

Related