React native Setup for iOS simulator on Macbook M1 2021 - fixing issues with (cocoapods & build).
Вставка
- Опубліковано 11 жов 2024
- This video have the solution for the problem I encountered while setting up the environment for react native on MacBook Air M1 2020
I was not able to run this code "sudo gem install cocoapods"
1- So I had to change Terminal to be used under Rosetta
2- I changed Xcode also to work under Rosetta
Other problem was error 65
and the solution is in the video also
Updated solution (May 2021):
First run your terminal and Xcode with Rosetta from this then check this video
• React native fix pod i...
Edit: My new video on how to use android emulator (Made by google) on M1 Macbook:
• React native setup for...
Like this video if it was useful & you can subscribe for support 👍
You are BOSS!! You saved my life... I was planning to return my MACBOOK Pro M1. Thanks again.
you are welcome 👍
Huge respect. I've been trying to solve this for almost 2 days. Thanks a lot!
For those people who have the 'RTC-Folly' Error, this works! Thank you!
Thank you so much after struggling 1 Month finally got the solution but please make a video for android emulator also for Mac M1 it will be a big help for React native developers
FINALLY, AFTER 4HRS I RESOLVED THIS ISSUE, THANKS
Thank you for your suggestions to:
1) Set Terminal to "Rosetta" mode. I haven't even thought about it! Xcode I set before, but not the Terminal
2) "npx react-native run-ios" is really something to try for other folks IF the build is not compiling in Xcode. Sometimes running from Terminal directly makes more sense than a buggy Xcode
Thanks again!
You are welcome 👍
Oh My God, your help was priceless! Thank you very much.
you are welcome 💚💐
thx dude.. nothing had worked until this video!
You are welcome 👍
Thank you so much man. You are a legend. Just subscribed and also turned on the notification bell. 😍
Thanks so much. I looking for this solution for several days in many videos and websites.
dude thanks! been trying to figure this out for hours lol. knew it had to be something simple like this 🤦🏾♂️
thank you so much you save my life i lost my 5 days finaly i got the solution than you so much again
You're welcome 👍
Thank you so much your effort @NourCoding. I have been struggling to run RN on my new M1 macbook pro. Your method with the pod install fixes the issue when running from xcode but still shows the
AMSupportURLSession is implemented in both ?? (***) and ?? (***). One of the two will be used. Which one is undefined. issue.
** BUILD FAILED **
---
Any thoughts on this?
Thank you again.
I also had to remove libPods-TestProject.a for it to work properly from Xcode
I was about to sell a mac, thank you very much
Thank you so so much sir, you have really saved my time after surfing for 3 good days you finally got the solution to my troubles
May God bless you and save your time just as you did,
Thank you again for the good work
amazing video keep up the good work💪
Worked like a charm
you are welcome
thanks, this command works for everyone except me. I'm about to go crazy. Think Different (Apple)
This solution is amazing!
broooooo, thank you soooo much, saved my life and my job hahahaha
Thanks Bro! This worked.
This is Awesome !!! thanks for that ;)
This really helped me out, thank you!
Thank you kind sir, it worked. But I have a question. What are those line you commented out?
I didn't know but I just searched it:
Flipper is a platform for debugging , Android and React Native apps.
Most likely it's same as test and jest dependencies that get installed in your package.json when init a new react native project
Thanx Brother my issues has been resolved because of you.....i was getting error during pod installation and after watching your video the issue has been gone now...... Superb
you are welcome
It worked just fine! Txs million.
welcome 👍
What a lifesaver!!! Thank you
Thanks for your help
You are welcome
Thanks, it is working but when I build my project in XCode getting an error like "Command PhaseScriptExecution failed with a nonzero exit code". Do you face same error?
Sorry, I don't know this
But you can try this solution
1- Go KeyChain Access --> Right Click on Login --> Lock & unlock again
2- Xcode --> clean Xcode project --> Make build again
find same error. If you find solution please tell me
Thanks man. Is there any way to run RN with M1 not Rosetta?
Thanks alot man! It saved hrs!
tips: if u miss the error"no bundle url present". you can try to update your node to 15.9.0. thanks a lot!
Thanks for the tup
awesome bro... you really save the day.
you are welcome
Thank you so much! You're a genius
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64 arm64e i386 x86_64, EXCLUDED_ARCHS=(
"x86_64"
)).
this is my issue when in try to run\
thank you ❤️
اخي نور الله يسعدك
struggling through this for 2 days and finally has been solved
Am wondering is it this complicated because apple hate cross-platform or what
شكرا جزيلا
you are welcome 💚العفو
🤷♂️ اعتقد دا بسبب تصميم البروفيسور الجديد
شكرا لك ياغالي❤️
You're a life saver man!, i've been struggling with problem for weeks now, i literally had to factory reset my mac trying to make this work. Looking forward to more of your videos KEEP IT UP!!
Thanks
I made another video for android emulator 👍
😍thanks
Merci mille fois Nour !
welcome 👍
Hi Nour, I tried to open with Rosetta but I don't have the Rosetta option. Any idea? Thanks
thank you, sir!
you are welcome
Thank You Thank You Thank You Thank You Thank You Thank You
a million thnx ✌️
welcome 👍
Selamun Aleykum, I am trying to compile for iOS with Expo, but I constantly encounter "install pods" errors, can you help?
I’m have an error with it installing bundled. Would you know how to fix it?
it only works in new projects one that you have already created you get that blessed error :S
solved running from terminal not the same visual code
Can you download games on the emulator?
Thank you so much, this was very helpful!
Thanks
ld: library not found for -lDoubleConversion
any solution for that sir?
please help
bro why i don t see open using rosetta can you help
Hi. mate, we are getting error 65 build failed and these processes aren't fixing the issue for us. Would you be able to help us please? We are using M1 mac. We have encountered the problem on various code files and even fresh ones when we try to remake however unfortunately we can't seem to get past it. Your help would be much appreciated, it would be ideal if we could teams call if you would? Thanks
Use this if you have the last update of iOS
in pod directory use this
sudo arch -x86_64 gem install ffi
then this
arch -86_64 pod install
(if not worked after this then comment flipper code then re run this code) then try run the application again
@@nourcoding3177 use what sorry?
@@sparkky5843
I made another video with the updated solution, check it:
ua-cam.com/video/rfITO9v_ST8/v-deo.html
thanks man , you are a crack
welcome 👍
i am getting error while running reactnative in iphone simulator on mac13
I did follow your instruction but it's still failed. Error is shown
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeProject.xcworkspace.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=273D6330-7290-49D6-A86A-44630CEF607E
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the AwesomeProject editor. (in target 'AwesomeProject' from project 'AwesomeProject')
/Users/huongnguyenvan/ReactNative/AwesomeProject/ios/AwesomeProject.xcodeproj: error: The linked library 'libPods-AwesomeProject.a' is missing one or more architectures required by this target: arm64. (in target 'AwesomeProject' from project 'AwesomeProject')
/Users/huongnguyenvan/ReactNative/AwesomeProject/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'boost-for-react-native' from project 'Pods')
objc[8402]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x204ed8188) and ?? (0x11b8682b8). One of the two will be used. Which one is undefined.
objc[8402]: Class AMSupportURLSession is implemented in both ?? (0x204ed81d8) and ?? (0x11b868308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
I have another updated video check if it may help
ua-cam.com/video/rfITO9v_ST8/v-deo.html
you may have another problem (check the full error message, it should be there)
I need help none of it worked and I think I just messed it all up
Could not find a valid gem 'cocoapods' (>= 0) in any repository
Saved my life man, thanks!
Your are most welcomed
may Allah bless you
welcome 👍
no build folder and still got errors
i am getting error in pod install
Run terminal as Rosetta, that was the solution
Also u can delete the build in the project, comment lines in the pod file as in video and reinstall pods
Hi Nour I'm running a error when run a command react native run ios.
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening fyp.xcworkspace. < This's what error I get. Any solution for it ?
@@simonlau6281
Open the ios folder in you project, there you will find fyp.xcworkspace or fyp.xcworkporj
@@nourcoding3177 I realised a difference which maybe it is problem of it. It didn't remove anything after i command the ' rm -rf build/'
Still i am getting error, pls help me
It could be something else wrong (try it on new project to get a clue if it's same issue)
Also you can try this updated solution:
ua-cam.com/video/rfITO9v_ST8/v-deo.html
That does not a solution but a hack. Dislike
Mmm, I posted this over a year ago, If there're a more direct solution for the problem it should be out there and it should be easily found too.
That's assuming that this problem have not been fix already by RN new releases.
This video was very helpful but I have a different error when I am setting up my project it doesn't says installing dependancies and when it reaches cocoa pods it gives me this:
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./test/ios && pod install".
CocoaPods documentation: cocoapods.org/
I tried installing it manually but it doesn't work what should I do
me too, did you fix this problem?
getting the same errors!
023-02-19 13:22:53.105 xcodebuild[3914:48875] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
-- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:518458A8-4976-4C77-9974-5131CE3BEB61, OS:16.4, name:iPhone 14 }
{ platform:iOS Simulator, id:518458A8-4976-4C77-9974-5131CE3BEB61, OS:16.4, name:iPhone 14 }
** BUILD FAILED **
Thank you so much
fatal error: 'React/RCTBridgeDelegate.h' file not found
Check this:
stackoverflow.com/a/68543052/11792060
Man U saved my life!! thank u a lot