0

I recently noticed that notifications for a mobile app I work on no longer work.

I had a thought this morning, and think it could be down to how we build the app now. Previously, we used the now deprecated expo build, and had issues migrating to eas build. We overcame this and now use npx expo prebuild to generate teh Android and iOS folders, which we can then pop into Android Studio and Xcode respectively.

I think that previously, expo build handled the push notification stuff, and we are now missing something that is causing them to no longer work.

I have been doing some digging over the last day, and saw that in my Identifiers for iOS, there was a prompt to configure some certificates for the Push Notifications, which we didn't have. I have since followed the steps to generate these, along with the .p12 files, but I am unsure of where to go from here?

The process for building our iOS app, is once the npx expo prebuild has completed, I drag the folder into Xcode, handle the signing and build settings, then configure my Gymfile, and then run fastlane gym to generate my .ipa file which I can upload to Apple/TestFlight no issue.

Is there something I am doing wrong?

TreyCollier
  • 181
  • 1
  • 12
  • Is there any specific reason you are running `npx expo prebuild`? You can build the app binaries for both Android and IOS using EAS build services which do not need any extra configuration steps. – Adii_Mathur Mar 13 '23 at 10:00

1 Answers1

0

I finally managed to get push notifications working for my React Native app.

So I followed the documentation for iOS and Android respectively, and went down the path of APNs and FCM.

So I retrieve my deviceToken from the application, which i securely store in my server database. Then, when a given event occurs that I want to send a notification for, I use the APN and FCM node modules to handle the notification.

TreyCollier
  • 181
  • 1
  • 12