What to achieve.
Build a react native app for ios release to be able to submit to TestFlight
What i've done.
- Read the documentation
- Change the scheme to build for release(production)
- Ran Product > Archive.
- Fails with:
'React/RCTBridgeModule.h' file not found
Other things to know. This project is using Cocoapods and this is the pod file
target 'surfpass_app_rx' do
pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'react-native-webview', :path => '../node_modules/react-native-webview'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'Firebase/Core', '5.15.0'
pod 'Fabric', '1.9.0'
pod 'Crashlytics', '3.12.0'
pod 'Firebase/RemoteConfig', '5.15.0'
pod 'Firebase/Messaging', '5.15.0'
pod 'GoogleSignIn', '4.4.0'
target 'surfpass_app_rxTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
The thing here is the app builds ok for debug, but not for release. I had other targets but now I just have one single target and still fails.