-
Notifications
You must be signed in to change notification settings - Fork 2
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
Solution: Upgrading from 0.61.5 to 0.62.0 "Undefined symbol: _swift_getFunctionReplacement" #25
Comments
I also had a few problems with android Problem 1
Solution1Upgrade react-native-webview per react-native-webview/react-native-webview#1011 Problem 2
This was coming from the Solution 2Add this to
|
setting DEAD_CODE_STRIPPING to TRUE solved it for me 🙏 |
@chestercharles ur solution in addition of 1- setting FB_SONARKIT_ENABLED=1
2- include /usr/lib/swift into Linking -> runpath search path ,
both those step with yours managed to make it work |
I managed to solve this issue just a few moments, ago. "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" opposed to $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) and followed the rest of the guides in #13 |
@chestercharles 's solution working on |
I followed both the OP instructions and I've added FB_SONARKIT and LD_RUNPATH_SEARCH_PATHS AND it worked 🎉 Then I dug into the changes and realised that we don't need the dummy file, it just looks that way because when you add it, it sets The rest of the changes are needed, as described in Setting up Flipper for iOS and Troubleshooting - since these are listed under setting up Flipper, I think they must be added to the original guide since I don't see how anything can work if you don't do them 😁 @pvinis? Edit: I didn't notice I was getting a warning:
but managed to fix it. |
$ react-native upgrade + lots of manual changes @ref: - https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2 - react-native-community/upgrade-support#11 (comment) - react-native-community/upgrade-support#13 - react-native-community/upgrade-support#25
Instructions on how to manually add Flipper 0.62+ on Flipper site vs upgrade-support repo are pretty different. Check https://fbflipper.com/docs/getting-started/react-native-ios . Shouldn't we point to Flipper site to follow react native instructions? The troubleshooting page https://fbflipper.com/docs/troubleshooting/ covers most of the solutions mentioned here |
After I implemented the solution, I kept getting the "No bundle url present" error. To fix it, I had to select my project -> select Build Settings -> Deployment (iOS) -> Strip Debug Symbols during Copy -> Set Debug to Yes. The reason is that in AppDelegate.m you have this piece of code:
In my case, since DEBUG was false, React Native was looking for a main.jsbundle file. After I set Debug to "Yes", the error disappeared and my app ran without any issues. |
I am getting the error:
after adding This is such a pain :( |
After I add these various fixes my app for iOS does build but freeze at startup, locked on the logo during app launch. Flipper does not report any errors, and there is no errors in the console outputs. These are the last errors reported in Xcode log output (appearing after my require cycles warnings), but I don't know if these are real errors or not.
EDIT : It could be related to this issue likern/react-native-enhanced-popup-menu#8 |
@AlexandrDobrovolskiy I had a problem where I set
If you're like me and new to Xcode, this instruction might not be clear enough. Here's a screenshot of the correct config: The key is the |
I also noticed that removing that second entry ( I wonder if we really need that, because from the error message it sounds like it's looking for What will happen if we just omit that second file (since the project get's built)? Any ideas? |
Following the SOLUTIONS in the topic works for me, just one thing: Enable Dead Code Stripping --> This needed to be done for the TARGETS level, not PROJECT level |
I did these steps from React Native 0.62 upgrade (Xcode) and set to Change this: IPHONEOS_DEPLOYMENT_TARGET = 9.0; To this: IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
LIBRARY_SEARCH_PATHS = (
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
"\"$(inherited)\"",
); Remove And it worked fine! 🚀 |
This is very important. I had been setting on Project level and wasting my time. Thanks @ptgamr. |
This has been driving me crazy. I've lost track of the amount of things I've tried haha. A build setting in Xcode that got rid of these errors for me (giving way to entirely new errors instead.... kill..... me..... ) was "Don't Dead-Strip Inits and Terms". |
Nothing helped. Want to see home widget preview. |
I have the same problem, and I can't see home widget preview, anyone have any idea? |
@ninjz Yes I have tried a dozen of times, no luck |
+1 |
Today I did something that I was hesitating a little bit but worked, I just created a new project and copy and paste everything from the old one, now it is working. |
I have updated the react-native version 0.61.5 to 0.63.3 and I am also facing the below issue. I tried the above solution but none of the solutions work for me. |
I am facing the same issue got these errors when build xcode
My xcode version is 12.1 None of those solutions works for me. |
as @helderburato said, you just have to do: |
Bug fix for "Undefined symbol: _swift_getFunctionReplacement" react-native-community/upgrade-support#25
Thanks these infos helped me to run on 0.63.2 |
@shufisyahida you saved my day!!! :D |
Thanks mate this helped me. |
can u provide podfile code? @onebuck-code @ptgamr |
Environment
Upgrading version
Upgrading from 0.61.5 to 0.62.0
Problem
Initial upgrade steps
I started by following the 0.61.5 to 0.62.0 RN upgrade helper. I performed all the changes shown in the diffs from the upgrade helper tool.
For the
project.pbxproj
changes, I proceeded to follow all four steps in the React Native 0.62 upgrade explanation in this repo.I encountered the following errors when attempting to build iOS
More detailed error
I found that some folks with the same error details in this issue thread from TelegramMessenger (completely unrelated to my app) but they seemed to find a solution by enabling dead code stripping.
I enabled Dead Code Stripping in Build Settings for DEBUG in EACH target of my project (we have 4). Dead code stripping was already enabled in the release configuration for all the targets and in the project build settings/
After enabling dead code stripping, I was able to build but the app would crash immediately with the following error
In order to fix this, I followed the steps in this SO answer, namely:
Dummy.swift
file to the project (I already had bridging header files from following the steps in issue React Native 0.62 upgrade (Xcode) #13 of this repo.Always Embed Swift Standard Libraries
toYES
in the build settings for my project and all my targets.Solution
So in summary, my complete upgrade steps were
Follow the 0.61.5 to 0.62.0 RN upgrade helper.
For the
project.pbxproj
changes, follow all four steps in the React Native 0.62 upgrade explanation in this repo.Enable Dead Code Stripping in Build Settings for both debug and release in each project target
Set
Always Embed Swift Standard Libraries
toYES
in the build settings for my project and all my targets.Either add a
Dummy.swift
file to the project, or don't delete the dummy swift file that you created in step 2 (the issue React Native 0.62 upgrade (Xcode) #13 in this repo).The text was updated successfully, but these errors were encountered: