-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] The following Swift pods cannot yet be integrated as static libraries [has workaround / Need Expo instructions to close this] #6332
Comments
(re-posting/moving here, from #6323)@RodolfoGS thanks posting a repro! What happens if you affect this: Experiments to run: 1- make that line say nothing except I'm not sure how exactly you would configure that in Note that use_frameworks interacts with Hermes and Flipper and react-native 0.69 with varying degrees of success depending on static or dynamic linkage. See reactwg/react-native-releases#21 (reply in thread) In general you should disable hermes and flipper if you use use_frameworks right now, and you should be on react-native 0.68.2 or lower, 0.69.0 won't work. (0.69.1 will have hermes and 0.69.1 working, but flipper will still not work pending a PR in the area...See reactwg/react-native-releases#23 (reply in thread)) |
Results:
|
So that actually seems like 1 will work for react-native-firebase, I think that's a positive result and figuring out how to preserve that result while using the default Expo podfile and making it happen with Podfile.properties.json would be useful as a follow-up. But now we move back to the other repo (mobile ads) to see what's going on there. I wonder if you reached in to node_modules/react-native-google-mobile-ads/ and tweaked the By setting |
@RodolfoGS I don't have time to play with Expo right now, but for Expo people on react-native-firebase: 1- need to determine what to put in Podfile.properties.json so it correctly sets Google Ads needs the Podfile variable set for static builds then it should all work |
I tested that and
But I have problems with another libraries, maybe because they doesn't have the "$RNGoogleMobileAdsAsStaticFramework" hack. The two libraries that I have the same problem are:
But I think that another users could have more issues with another libraries. In the meanwhile I will stay in 14.11.1 |
Interesting, you could check their podspec and try to patch it, that variable that we add does a really simple change and it is patch-patchable really trivially as a test... |
The specific change in the affected libraries is just to add this: s.static_framework = true (the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Does anyone know if there is a way to resolve this under the managed workflow using EAS? |
@nbonatsakis I'm not sure how to do it in Expo terms but if you can:
and
and
...and there are no other native libraries to patch then... should work? It's relatively easy to do that in a non-Expo context but I don't have Expo experience so I'm not sure Otherwise, v14 here is already aging but it was state of the art just a month ago or so, open source is messy and compatibility is difficult but if you can't answer the "how" for 1 and 2 above, someone surely will before too long (I hope!) |
Hmm. I pre-built the project and changed the Podfile to include |
I'm a very practical person with a strict requirement for automated solutions. If you can automate something that works 100% of the time every time, that works for me and we'll all do a happy dance! |
Users have noted, when trying installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end |
Temporary Workaround: This might be an issue with one of the new versions that was shipped. I was encountering the same error in |
This fixed it for me:
|
mikehardy I have the same issue with bitecode but when i'll use your solution I get another error |
With apologies I'm traveling right now so haven't had time to do another batch of resolution / developer-experience-smoothing here, or in the related repo where I test things (discussion at mikehardy/rnfbdemo#10) |
This works 👍 |
Downgrading of course works, but that's the same as saying "the new version is a bit difficult so not using it avoids the difficulty", in other words it is a tautology --> 1 = 1. For anyone that needs to do this I do understand, but please pay attention to this issue for progress so you can successfully move on to future version versus being stuck forever on the old stuff |
For expo based projects, make sure you have added this line of code in
Hope it helps 😊 |
It worked following steps.
Hope it helps. |
Before you copy and paste some part of pod from above comments: for example:
And still it not working on your side, please read again why you build was failed Each project require different pod's to define. So if your prebuild fail still, please check again the log output what kind of pod's have to be defined in Podfile. |
Has anyone run into this again? I tried this solution, and a bunch of others like it:
But I still get the same error message over and over again when I run
I am using:
things were working just fine until i added the UPDATE (~30 min later) Wowwwwwww... i have literally spend HOURS on this build issue tonight, and have solved it. Apparently, I had all my |
@yaylinda thanks for sharing your findings! I wonder if you could share how you managed the EAS secrets with this approach, since the |
@slapbox I think you can do the other way and move everything to app.config.js |
Unfortunately that's what I'm already doing and the build still fails with a related error. |
Hmmm strange @slapbox . And it's working for me. My package.json script to prebuild |
Has anyone got this working for Expo 50.0.14 & RN 0.73.6? I followed the instructions exactly with {
"expo": {
"name": "journey",
"slug": "journey",
"scheme": "journey",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/public/icon.png",
"userInterfaceStyle": "dark",
"splash": {
"image": "./assets/public/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"googleServicesFile": "./firebase.plist",
"bundleIdentifier": "com.test.journey"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/public/adaptive-icon.png",
"backgroundColor": "#000000"
},
"googleServicesFile": "./firebase.json",
"package": "com.test.journey"
},
},
"plugins": [
"@react-native-firebase/app",
"@react-native-firebase/auth",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static"
}
}
]
]
} and still seeing:
|
I still have this issue in expo managed builds - any advice on what to do? my plugins looks exactly the same |
Add use_modular_headers! after your target 'yourproject' do |
|
@tyeetale did you start any discussion on the Expo issues tracker or their Discord? If so, could you link it here? |
@Nantris |
For me it was the other way around. I have the import { ConfigContext, ExpoConfig } from "@expo/config";
export default ({ config }: ConfigContext): Partial<ExpoConfig> => {
// ... config overrides
config.extra = {
// ... config overrides
...config.extra,
...config.plugins, // <-- Was missing this spread
};
return config;
}; |
adding these line -> right before -> use_react_native! (in podfile) will fix the issue |
Don't use modular_headers. Just move |
@hmadJutt and @Nagibaba - Does this mean if folks are using React Native 75 with Hermes enabled, installing the latest version of RN Firebase 20.4 should work? I lost track of the changes and didn't know if use_frameworks! still causes issues with Hermes and/or the new architecture Any help is greatly appreciated :D |
I am still getting this error in expo.dev when running
I have followed the react-native-firebase setup for expo and added the necessary values to app.config.js :
Also tried using ExtraIosPodDependency and extraPods, but that didn't help. "expo": "~51.0.31", |
I'm on bare metal react native 75.2 and I was able to get Firebase 20.4 to work without modular headers. It also runs on android! Excited to finally be off of RNFB 14.12 🎉 Package JSON "@react-native-firebase/analytics": "^20.4.0",
"@react-native-firebase/app": "^20.4.0",
"@react-native-firebase/auth": "^20.4.0",
"@react-native-firebase/crashlytics": "^20.4.0",
"@react-native-firebase/database": "^20.4.0",
"@react-native-firebase/messaging": "^20.4.0",
"@react-native-firebase/storage": "^20.4.0",
"react": "18.3.1",
"react-dom": "18.0.0",
"react-native": "^0.75.2", My Podfile
|
That's so interesting! I wonder if there's any potential downsides to this or reason to think it couldn't be used with Expo (via a config plugin.) Thanks for sharing @ucheNkadiCode! |
for those who looking for expo, here mine (Expo ~50.0.14)
|
Thank you very much for sharing @Armanoide! Are you applying that config with an Expo plugin? Or otherwise how are you keeping it in source control? It's amazing you got this working! |
For me this worked only after implementing it running expo rebuild and then it worked. |
@harterc1 struggling with this problem for several days.. thanks! |
[UPDATE: we have something that works below, but we need an Expo user to figure out how to correctly set two items in the Podfile in The Expo Way]
Issue
pod install
not working with the following error:How to reproduce
expo init Test --npm
cd Test
npm i @react-native-firebase/analytics @react-native-firebase/app
cd ios
pod install
If your prefer I created a repo: https://github.com/RodolfoGS/FirebaseCoreInternal-issue
git clone git@github.com:RodolfoGS/FirebaseCoreInternal-issue.git
cd FirebaseCoreInternal-issue/
npm i
cd ios
pod install
This happens with all Firebase dependences, I tested with:
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:# N/A
AppDelegate.m
:// N/A
Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:15.0.0
Firebase
module(s) you're using that has the issue:@react-native-firebase/analytics
TypeScript
?Y/N
&VERSION
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: