Closed lucnat closed 8 years ago
Nope, still getting error code 8.
let me see the push configure you have on the server
Push.debug = true;
Push.allow({ send: function(userId, notification) { return true; // Allow all users to send } });
Push.Configure({ // Google Cloud Messaging apn: { certData: Assets.getText('finalpush.pem'), keyData: Assets.getText('finalkey.pem'), passphrase: '', gateway: 'gateway.push.apple.com' }, gcm: { projectNumber: , apiKey: "***" }, production: true, sendInterval: 2000 });
so 2 things, in your build in xcode make sure you have push enabled
then check: That is most probably a problem with your provisioning profile, you have to solve it in developer.apple.com, you go to account -> click on Certificates, Identifiers & Profiles -> click on identifiers - app ids -> select your app -> click on edit -> select push notifications.
can we use p8 with raix now? if so, where could I read more about this?
I think so, did you check the identifiers?
yup, i got them all set properly:
and here is from my xcode:
it has to be the old device token. Clear the collections again
I cleared it and tried to push again, still getting error code 8:
Push: Send message "Engineer on watch" via query { userId: 'kL2QqFdDTHfQsQbTH' } send to token { apn: 'cAVqXUkdFLc:APA91bGhp8ldMkeTNwlLb6yQWoGyPYEXRkJEK_84OSJHH4EJwcuquRlG_dt0Ywfnaoo7rXZEAXLUpMSRaNO6jlWpYWFgjIywiAbAgMTwItLfsgJ_Li-OZvwx9KzDjKVDqy9s5t5792ks' } Push: Sent message "Engineer on watch" to 1 ios apps 0 android apps Push, GUIDE: The "Push.appCollection" - No GCM clients have registred on the server yet... Got error code 8 for token cAVqXUkdFLc:APA91bGhp8ldMkeTNwlLb6yQWoGyPYEXRkJEK_84OSJHH4EJwcuquRlG_dt0Ywfnaoo7rXZEAXLUpMSRaNO6jlWpYWFgjIywiAbAgMTwItLfsgJ_Li-OZvwx9KzDjKVDqy9s5t5792ks
Application has the entitlement key
the error code means the something is point to the sandbox environment, so we at least now the cause we just have to keep going through checks.
Alright, Thanks.
Where do I find the mobile.eembeddedprovision?
Though I could see the aps_environment during distributing the app in xcode like this:
platforms/ios/APP_NAME/Entitlements-Release.plist platforms/ios/APP_NAME/Entitlements-Debug.plist
make sure you have production set.
weird, i dont seem to have an embedded.mobileprovision file.
Oh I found it:
Make sure it doesn't get overwritten
what version of xcode?
Should the Entitlements-Debug.plist have development?
Here's my xcode version:
did you do xcode legacy build? https://github.com/apache/cordova-ios/issues/407 In Xcode, go to: File -> Project Settings (or Workspace Settings)-> Build System
From there you can select New Build System (Default) or Legacy Build System
are these: certData: Assets.getText('cert.pem'), keyData: Assets.getText('key.pem'),
the production certs you made?
change Should the Entitlements-Debug.plist have development? to production. This sets the environment.
yup. they are the production certs I made. And yes I set both Entitlements files to production now. Rebuilding them and will submit to testflight again
set the Entitlements-Debug.plist to prod change the string to production, then rebuild and upload to the store
Alright, will do it. thanks. I'll let you know how it turns out. Hopefully this should work now
Unfortunately still getting error code 8. I really don't understand tho, all my environment variables are correct, my certificates are correct too. At this point I might try using p8 files to see if it would get rid of the error code 8
You could try.
Thanks for all the help. Been stuck here for months.
I"m still wondering if its the device. If you install the app from the testflight app, it should be fine. I guess you could try p8 files for a different result. IF we get the same result then we know its the device.
np.
I'll try a different device and see if it would work. Im testing on an IOS 13 device
Try to a different device with the same build. I think something on xCode is not setting it be a production environment, I feel your certs are fine.
I tried a different device and I still get an error code 8. This is really weird as I've tried a lot of "solutions" already like redeploying in server, testing the certificates, checking the app ID is the same, etc
paste your signing a capability push notifications section
Make sure you see that when your about to distribute.
alright here's the signing and capability:
and before distribution:
try to upload this to the app store
I cant make this work so I used p8 files instead and I finally am able to get notifications on both development and production. Thank God.
and thank you as well for helping me out
Np, Apple stopped making p12 files, but I didn't think they wouldn't no longer work with production. I guess we should check into any official announcement. Glad everything works now.
I am in the process of deploying my app to the app store. I have tested all certicates and keys (development and production) and they are fine. Push works perfectly in development. However, when I set NODE_ENV to production and also "production": true in config.push.json, it won't work anymore. Upon sending a push notification, I get the following error:
I can imagine that this happens because the app has been installed via xcode on the device. Can anybody confirm? Will the message disappear once the app has been installed through the app store? And what is the correct push setting to use with Apple TestFlight?