Projects and environments
A project holds everything for one app: its credentials, devices, templates, keys and delivery logs.
Test and live
Section titled “Test and live”Every project has two environments.
- Test is for building. Devices registered with test keys only get pushes sent with test keys, so nothing reaches your real users.
- Live is your real users.
The two never mix. Each has its own keys, devices, templates, logs and webhooks, and a device registered in test can’t receive a live push.
Apple’s sandbox and production
Section titled “Apple’s sandbox and production”Separately from test and live, every Apple push token belongs to one of Apple’s two push servers. Debug builds from Xcode get sandbox tokens; TestFlight and App Store builds get production tokens. The token itself doesn’t say which, so the client SDK reports it with each registration as apns_environment, and PushFleet sends each device to the right server.
That means a TestFlight build on your test keys gets its pushes, and so does a debug build on live keys. A token sent to the wrong Apple server is retried on the other one, never treated as dead.
The key decides
Section titled “The key decides”Requests never say which environment they’re for. A pf_sk_test_… key talks to test and a pf_sk_live_… key talks to live, so a test key can’t send a live push by accident, and requests stay a few bytes smaller. To ship, swap the keys.
Differences in live
Section titled “Differences in live”Live mode requires identity verification when a device registers, so nobody can register their phone under someone else’s user ID. Test mode leaves it optional so the quickstart stays two calls.