How to build expo project for IOS app dependent on Firebase Cloud Messaging for push notifications

190 views Asked by At

I am trying to build my expo project for IOS using EAS build and constantly run into an issue. The project implements:

  • "expo": "~48.0.18"
  • "react-native": "0.71.8" and these firebase modules,
  • @react-native-firebase/app": "^18.3.0
  • @react-native-firebase/messaging": "^18.3.0, which are needed for push notifications, and the required native linking via plugins are properly in place. This works perfectly fine for Android builds.

The issue came up at this point of the build

The actual error message

I came across an article stating it has something to do with adding some lines to the podfile and I really don't know how to go about this using expo, neither am I sure that it would help fix the issue for good. I'd really appreciate ideas on how to resolve this.

1

There are 1 answers

2
Cory Cunningham On

If you followed the docs you should add use_frameworks! :linkage => :static into your ios/Podfile.

Don't forget to also disable flipper by commenting out the :flipper_configuration in the use_react_native method.

Your Podfile should look something like this

# ios/Podfile

target 'SidegigMobileFrontend' do
  config = use_native_modules!
  use_frameworks! :linkage => :static
  $RNFirebaseAsStaticFramework = true

  # ...other stuff...
end