React native IOS build issue - xcode

I installed Xcode from AppStore and started the project with react-native init IOS_project command. I had an error after running npm run ios and I opened .../IOS_project/ios/IOS_project.xcodeproj file with Xcode and started the build. Build was failed with the error
fatal error: module map file /Users/artemgorovoi/Library/Developer/Xcode/DerivedData/IOS_project-distoubdwfsutrcrzcjxmzmcwzfx/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap not found
https://i.stack.imgur.com/CWx5U.jpg
https://tinyjpg.com/web/output/rt2x4mgj3tgk8607dy3q0ad6utw2ep1m/94D33C31-0A82-406D-B07F-299E0F621023.png

this happens because in order to run your React Native project through Xcode you must open the .xcworkspace file, in your case IOS_project.xcworkspace, if you only open the .xcodeproj file Xcode won't be able to locate your Pods

Related

ld: library not found for -lAnalytics error for expo bare workflow app on iOS

I'm getting the following error from xcode when I try to build a project I ejected from expo:
ld: library not found for -lAnalytics
I have the expo Segment package installed, and have gone through the regular ejection process, installing and configuring unimodules, and running npx install
Where should I start looking for this error? - Analytics (4.1.3) appears in my podfile.lock and I have an Analytics folder in the Library folder. I'm at a complete loss
The fix was exactly as #brentvatne said, I had opened the project via xcodeproj NOT xcworkspace. Xcode remembers your choice so on subsequent openings of xcode it had defaulted to xcodeproj.
Solution: open project with xcworkspace.

FBSDKCoreKit.modulemap not found in XCode with Cocoapods

I'm using Cocoapods to add FaceBook and Google platforms to my iOS app in XCode 12. Trying to build, I get the error below.
iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap not found
I've run all the steps to import the pods and they seem to all be in place. In fact, the missing modulemap is here:
..ProjectName/Pods/Target Support Files/FBSDKCoreKit
So it appears XCode simply can't locate the file during the build process. I'm definitely opening the workspace created by the Pod install and not the standalone project. Any thoughts on how to make this connection?
On Xcode 12 you got the error: FBSDKCoreKit.modulemap not found because you are opening file with extension .xcproject which will causing no dependencies to your projects.
So quit Xcode and open project again by opening file with extension .xcworkspace (beer in mind you should do this while working with React Native)
Then Product > Clean and Product > Build
Cheer!

Flutter app uploading to AppStore Xcode error: Rsync failed

Whenever I try to Validate App after Archiving it in Xcode I get the following error popup:
Rsync failed
It then shows a 'Show logs.' button but when I select that it opens a folder called 'T' which contains many files and folders.
How can I see the logs that I need to fix this error?
Using Xcode 11.5
Usually the problem with Rsync is with the pods and the build itself. Try to run flutter clean, run pod install inside the ios folder, test your app in a real devidce, build the app and try again.

I can run the IOS emulator but project is not present

Unfortunately, I've deleted my react native project with Xcode may it be the .xcworkspace file or .xcodeproj. file
So in order to get my project back with .xcodeproj, I had to rename my project eject and update react native. Having said that I am able to load the emulator but the project is still not present in the emulator. How do I reintegrate it back?
Here is the error that is seen on terminal:
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 Project.xcodeproj

Can't find React native project on iOS Simulator or Xcode project

I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
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 project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project

Resources