I'm developing an app which has two targets, one is for enterprise in-house distribution and other one is for Appstore. There are two Apple dev account, one is enterprise (used for enterprise target) and other one is standard one for Appstore.
I'm using in-house target for testing purposes only (I have lots of test devices so I'm using it). I have a production push notification certificate for the Appstore target and I want to add a new certificate for in-house target too. I'm curious about if it will be a problem for my Appstore target?
So my question is: Can I have two sandbox & production apn certificate one for Appstore and other one is for in-house? Will notifications will mix?
There is no official APNs documentation specifically for handling separate targets within same project, because APNs has nothing to do with your project / target set up.
As you can read in Setting Up a Remote Notification Server,
The delivery of remote notifications involves several key components:
- Your company's server (known as the provider server)
- Apple Push Notification service (APNs)
- The user's device
- Your app (running on the user's device).
Each item in above list is identified by
As you can see there is not restriction on which server can trigger which remote notification, or how the app code, project, or targets are set up.
A single server (or even a developer machine, from command line using curl
), can trigger push notifications, for all the right combinations of above conditions. It is up to you to make sure you use the correct certificate for the correct version of the app. e.g. if you use the InHouse app's APNs certificate with an AppStore app's device token it will fail, etc.
Many developers (including myself) have triggered push notification from command line, to multiple versions of the same app, with separate targets and it works.