Open huyvuskedulo opened 1 year ago
Hi @huyvuskedulo, thanks for reporting this issue!
Why do you need to use use_frameforks!
in your Podfile? I've launched the app without this line and it has been built properly in my case.
Hey @tboba ,
Our app is a hybrid app which already being built by using native code (iOS/Android) a lot of places, and we're using many native libraries + Swift, so we can't get rid of use_framework!.
UPDATE; I downgraded the package into 3.25.0
and it does seem working fine
@huyvuskedulo, I've narrowed down my search for PR that introduced this error to this PR: https://github.com/software-mansion/react-native-screens/pull/1920.
Could your please test react-native-screens
version w/o this commit?
You can do this by putting following line in your package.json:
"react-native-screens": "software-mansion/react-native-screens#72ab69225acb22d7d9c27f0a927c6ca1b0516344"
Please let me know, whether the crash happens on that version.
Hi @huyvuskedulo, since this issue is inactive for 3 weeks I just wanna make sure that you've managed to check the version without the commit mentioned by @kkafar. Are you still facing any issues there?
Allow me to mark this issue with Close when stale
tag for now, but don't hesitate to share your feedback there!
Hey @tboba , thanks for the fix, it seems that it's working with that commit.
Sorry for the late reply since i'm not following this upgrade program anymore, but I did try your commit so far and it seem it bypassed the error, however i'm still facing other issue with the migration but not seem to relate to this fix. So I can't guarantee this fix will impact anything else :)
Hi @huyvuskedulo, thanks for the update! @kkafar so it looks like we should modify or even completely revert this commit 👀
Yeah, that might be a one solution.
But I would suggest holding our commit-reverting-horses until we know what the root cause is.
I do not understand what mechanisms are behind this error right now, still need to debug it further, maybe it could be solved in some other way.
@huyvuskedulo I will assume you've enabled dynamic link for the project. For a quick fix you can set the build type for reanimated and rnscreens to static and that will fix the project.
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNReanimated') # add more pod names here
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
end
Thanks @mateioprea! I had the same error as @huyvuskedulo and indeed, I'm using dynamically linked framework (one of our major native dependency relies on it)
Setting RNScreens to stay statically linked in the podfile did the job 👌 Edit: And indeed I absolutely have to make static RNReanimated too!
It's not the first pod we modify that way, and probably not the last either 😅 We will probably keep it that way, unless you strongly not recommend it as you said it's only a quick fix!
i resolved the issue with below changes in pod file
Package.json
"react-native-reanimated": "^3.13.0",
"react-native-gesture-handler": "^2.17.1",
"react-native-screens": "^3.25.0",
Pod file
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNScreens') || pod.name.eql?('RNCMaskedView') || pod.name.eql?('RNReanimated')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end
installer.pod_targets.each do |pod|
if pod.name.eql?('RNReanimated')
def pod.build_type
Pod::BuildType.static_library
end
end
end
After above changes in pod file clear derived data and clean the build , Install pod again and run
Description
We're trying to update into latest version of react-native + reanimated + react-native-screens, so far not so good we're able to track down which is the package that keep throwing the errors with some specific condition.
Our app is vanilla app and using old architecture.
Here is the error that it's throwing on Xcode after try to build the project:
I believe this is the combination of the use_framework + react-native-reanimated + react-native-screens
Steps to reproduce
Here is the simplify Podfile
This is how the package.json look like
Snack or a link to a repository
https://github.com/huyvuskedulo/TestProject
Screens version
3.27.0
React Native version
0.72.6
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes