I know its a common question as React Native maps does not support use_frameworks!
but all the solutions in the web not working for me (may be those are too complicated). May anyone please help me how to make React Native maps work with use_frameworks! :linkage => :static
as React native Firebase demands it. I am ready for my all available bounty :(
React native version: 0.70.6
React Native Maps: 1.3.2
I had to add google maps and firebase both so needed to avoid use_framwork. This is what has worked from me after two days got wasted on it.
solution is to use firebase pods like this.
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseStorageInternal', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseAppCheckInterop', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true
pod 'FirebaseMessagingInterop', :modular_headers => true
pod 'GTMSessionFetcher', :modular_headers => true
pod 'FirebaseAppCheckInterop', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
as explained on this link. give that person a thumbs up as well.
my pod file:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false
target 'ReactNativeBoilerPlate' do
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
config = use_native_modules!
# React Native Maps dependencies
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
target 'ReactNativeBoilerPlateTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
end
end
end
end