Closed RayyanLaunchVisory closed 11 months ago
Actually, it's a react-native bug: on iOS, use_frameworks!
is not compatible with Flipper, New Architecture and Hermes.
Never mind, because it's deprecated.
RN 0.72 let use_frameworks!
be compatible with New Architecture, ref to https://blixtdev.com/react-native-0-72-whats-new/
Downgrade @react-native-firebase/app
to v14.11.1
can work, ref to https://github.com/facebook/react-native/issues/34381#issuecomment-1233396599
For @flyskywhy/react-native-gcanvas
, maybe modular_headers => true
ref to https://stackoverflow.com/questions/73416469/after-installing-react-native-firebase-app-its-build-will-failed-in-react-nativ can work, but a react-native-firebase maintainer reply in this ref that it's unsupportable.
So I try just
npm install @react-native-firebase/app@14.11.1
cd ios
pod install
and no
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
ref to https://github.com/invertase/react-native-firebase/blob/v14.11.1/docs/index.md
found can pass build and my APP runs well.
Please try your APP and tell me if the firebase itself which comes from @react-native-firebase/app@14.11.1
works well.
Thank you for your valuable input on this @flyskywhy .
I was able to solve the issue by:
use_modular_headers!
to the PodfFile globally.pod "RNFBApp", :path => "../node_modules/@react-native-firebase/app"
to PodFile.The idea came to me when I was looking for integration help.
Hence, closing this issue now. Thank you again for your support! 👍
@RayyanLaunchVisory , can you paste here of your Podfile which solved the issue?
@flyskywhy Here's the PodFile I have that works:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
use_modular_headers!
target 'myapp' do
config = use_native_modules!
# Permissions (react-native-permissions)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
# SwiftyStoreKit
pod 'SwiftyStoreKit'
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => FlipperConfiguration.enabled,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
pod "GCanvas", :path => "../node_modules/@flyskywhy/react-native-gcanvas/GCanvas.podspec"
target 'myappTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Thank you for your valuable input on this @flyskywhy .
I was able to solve the issue by:
- Adding
use_modular_headers!
to the PodfFile globally.- Adding
pod "RNFBApp", :path => "../node_modules/@react-native-firebase/app"
to PodFile.The idea came to me when I was looking for integration help.
Hence, closing this issue now. Thank you again for your support! 👍
Thanks for your paste of Podfile, but why I can't find "2. Adding pod "RNFBApp", :path => "../node_modules/@react-native-firebase/app"
to PodFile." in it?
Problem
I had this library integrated and working on iOS perfectly, until I decided to add Firebase library. I followed these instructions.
Steps Taken
npm install --save @react-native-firebase/app
GoogleService-Info.plist
file to my project like this.use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
pod install
But when I run a build from Xcode, I get the following error in GShader.h:
Relevant Versions
"@flyskywhy/react-native-gcanvas": "2.3.26"
AND"@flyskywhy/react-native-gcanvas": "^6.0.11"
"react-native": "0.70.5"