Hi,
Since upgrading to iOS9, my team has found what appears to be a bug related to the token generated from the Apple Push Notification Server in apps that are in the production environment when using a device with a UDID that is also registered as a test device in the Certificates, Identifiers and Profiles settings in the developer member center. So far we've only tested this on TestFlight
We've found that when building apps using an App Store provisioning profile for distribution and the entitlement: "aps-environment: production", the device that is also enabled for testing will always get a development certificate from the APN-server. Thus we receive an error code 8 (Invalid token) server-side when we try to transmit a notification to the device. We had a total of 3 devices registered and had the problem on all 3 of them. We removed 2 of the 3 devices from the Certificates, Identifiers and Profiles settings and published a new build on TestFlight. The 2 devices then received production tokens and the notifications were delivered correctly. The 3rd device, still enabled for testing, still gets the development token.
This problem has happened after building the app with the iOS 9 SDK Framework.