Now, head over to the Apple member center and generate an APNS auth key. In the Certificates, Identifiers & Profiles section of the Member Center, under Certificates there is a new section APNs Auth Key. There click the add button to create a new key.
Under Production select Apple Push Notification Authentication Key (Sandbox & Production) and click continue and a key will be created for you.
Download the .p8 file and note the key ID and the .p8 filename, as we'll need those in a moment.
APNS_KEY_ID = 'ABC123DEFG'
APNS_AUTH_KEY = '/PATH_TO/APNSAuthKey_ABC123DEFG.p8'
While you're in the member center, grab your Team ID as well in the membership area.
TEAM_ID = 'DEF123GHIJ'