i am building a standalone ios app using SDK 32.
notification works fine when run during development in expo client but fails in standalone app installed via apple testflight.
im using exact same code provided in the doc to get permission and device token for push notification
I have fcm setup for android and config file added.
APN key added during IOS build. i have added same key to fcm as well.
apple APP ID has push notification added.
Could you provide a more complete code excerpt? Permissions.getAsync() returns a promise, so you need the await keyword, as it is used in the docs (e.g. - const yourVariableName = await Permissions.getAsync(Permissions.NOTIFICATIONS)).
Other than that, what platform/device are you running the tests on via testflight? Just checking to make sure since simulators can’t receive push notifications.
I am having the same problem on IOS Standalone Build.
I’m using SDK v31.
The permission is correctly obtained on Expo app but on IOS Testflight build with SDK v31 it returns “undetermined”.
Help please i tried to rebuilt several times but still the same. I also delete all the certificates from my Apple Developers Account and choose to let Expo handle those for me but still is not working. Thanks
i am sorry I wrote just the method for simplicity, await is used in real code. We’ve figured it out what was wrong with our project, I am writing a separate reply with our solution, thanks for responding, much appreciated.
Our Apple ID didn’t have push notification service enabled at first. we enabled it for a later version. To have push notification enabled for your new builds you need to have
Push notification enabled in APP ID (you might need to generate SSL certificates, which can be generated from same screen)
Provisioning profile must have push notification listed in services enabled
generate a key for APNs
use only production cert and provisioning profile
clear current credentials from expo and download and upload certificate, provisioning profile and push key
In our case our APP ID had the “Push Notifications Service” disabled, we enabled it (Leave it as Configurable), refresh the Provisioning Profile so it listed the Push Notification Service as enabled and generate a new build. Now the status of the permission is correct and it returns the correct Expo Token
I made the same changes, now “Push Notifications” appears on “Enabled Services”… but I still cant get the Expo Push Token. Please tell me if i have to download the certificates and pass to expo build:ios.