React native Xcode build error - ios

I am using react native 0.39.2 version, after running on device using xcode 8.2.1 i am getting this error :
Shell Script Invocation Error
../node_modules/react-native/packager/react-native-xcode.sh: line 41: cd: /Users/shafips/Documents/Projects/My: No such file or directory.
any idea.

Remove iOS and Android folders and run
$react-native upgrade
Then
$react-native link
Try running again
Happy Coding!

Solved!.
Yes, Removed spaces from project folders.

Related

/bin/sh: /Users/{userName}/Desktop/{name}/Test No such file or directory (React Native Ios build issue in Mac book)

Project is in React Native Cli.
Error screenshot
RN version : 0.68.0
Mac book modal : 11.67
react version : 17.~.~
XCode version : 13.1
this error occur on local run of react native cli project.
Note : I already check through by deleting pod folder and reinstall it. but didn't work. Also test with by with and without comment code of flipper in pod file
Check your main folder name it should not include spaces. After doing this try building your app again.

Problem to run Nativescript app on iOS 14?

after updating my NS app to latest version.. I am now suffering to run it on my iOS device..app simply does not open even though its installed. I was trying to run from xcode and got this msg on log :
Class TKDataSource is implemented in both /System/Library/Frameworks/CryptoTokenKit.framework/CryptoTokenKit (0x1fdff00d8) and /private/var/containers/Bundle/Application/A97BDBFB-56E2-4303-A817-F582CEF25550/MYDOC.app/Frameworks/TNSListView.framework/TNSListView (0x104966e70). One of the two will be used. Which one is undefined.
ns run ios shows this error :
unable to apply changes on device: 7BE6C620-A73C-42DF-81AD-65A0083CB13E. Error is: ENOENT: no such file or directory, scandir '/Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data/Applications'.
Any Idea?
Thanks
Try adding an Applications folder to the path /Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data.
I hit that problem, too. I was able to bypass it by opening the emulator via xcode first, and then entering tns run ios --emulator.
what worked for me was making the directory that's trying to be scanned. So in your case running the command
" mkdir /Users/timmrichter/Library/Developer/CoreSimulator/Devices/7BE6C620-A73C-42DF-81AD-65A0083CB13E/data/Applications "
Should solve the problem.
As I have some plugins like i18n which seems not supported on NS latest version. At the end I have downgraded to version 6.5.3 and it's now working on iOS 14.

Run Custom Shell Script [cp] Embed Pods Framework

My Project was building fine before the latest update of xcode.Currently running 10.1 version of xcode and high sierra below are the errors screenshot
It's hard to say what is wrong without script. By error description bad interpreter: Operation not permitted I can have a guess you have syntax error in script or one of commands in script requires sudo.

React-Native: Build error GeneratedInfoPlistDotEnv.h file not found

I had a old React-Native project which I wanted to give it a try again and when trying to run the project on iOS (Android works perfect) I get the error that Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h file not found.
If I run the project from the command react-native run-ios, than the build will succeed.
What can cause this issue and how can it be fixed?
I have tried to fix it with the comments from this issue but no success.
React-Native verision: 0.47
Full error:
<built-in>:1:10: fatal error:
'/Users/myUser/Library/Developer/Xcode/DerivedData/Project-gcaxrvbcwgkfhkadevoqxcprxszw/Build/Products/Debug-iphonesimulator/GeneratedInfoPlistDotEnv.h' file not found
I fixed by copying file GeneratedInfoPlistDotEnv.h (in /ios/build/Build/Products/) to the path mentioned in the error message.
The path mentioned in error message for simulator is not same as real phone, you need to copy for a second time.
The development for React Native just like droped in a deep black hole, what you need to do is just climb and climb and climb...
Changing the Info.plist preprocessor prefix file to works for me ${CONFIGURATION_BUILD_DIR}/../GeneratedInfoPlistDotEnv.h
Image of code in Xcode 9
If you're coming from React version 0.60 and above, you should be referencing the package from GitHub instead of NPM. The author hasn't released auto-linking support on NPM yet, even though it's already merged!?
Try these steps after you unlink and uninstall the existing version of react-native-config. Remember to revert to default Info.plist preprocessor settings in XCode build settings.
yarn add https://github.com/luggit/react-native-config.git
cd ios && pod install
You don't have to add any other post-install scripts, just run the app like usual and it should work fine. Make sure you undo any other fixes before doing this.

‘Cordova/CDV.h’ file not found in Xcode 8.2.1

I have one hybrid Cordova project, which is running fine Xcode 5.1.1, but when I am trying to Archive the project in Xcode 8.2.1 with ‘Generic iOS Device’ I am getting the error ‘Cordova/CDV.h’ is not found.
I read many articles about this problem, but none could solve my problem. Most answers are telling to follow the below steps:
"Add this line to your Build Settings -> Header Search Paths:
$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
"
I have did this but problem not solved, getting another error ‘ld: library not found for -lcrt1.3.1.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)’
Also I have changed the bitcode YES to NO in target Build Settings, but no fruitful result.
Project cordova version 3.4.0 where installed cordova version in machine 6.4.0
Has anybody experience with this kind of problem?
Please, can anyone help? I've been working on this for days.
I got it work by following below steps
In your Xcode project settings select TARGETS
Within TARGETS select the Build Settings tab
In the sub-options under the Build Settings tab be sure to select All
Scroll down to the Search Paths section
Locate Header Search Paths
Add the following configuration to the Release option (as a new value on its own line): $(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include
Clean the project: Command + Shift + K
Restart Xcode
I wanted to report that the response provided by Vinay worked for me. I had to make sure I was in the share extension target, and I added it to the path exactly as suggested above in the Release option, and did not even have to do a clean to get it to regenerate the PCH.
BUT, I was puzzled by this after looking at the setting further and I realized this path was already in the setting. I edited it again, and removed the redundant path, hit 'run' again, and it loaded onto my iPhone and ran fine.
So, I believe that just setting this in the search path forced a recompile on the share extension PCH and all is working again.
I hope this helps others.
I know its too late to answer on this question but still many developers facing the above issue and as per the latest Cordova & ionic version below steps will work in the above error.
As per new update in Cordova some time due to some permission issue or directly run or build iOS platform it's unable to add below file or folders in your iOS project platform :
CordovaLib
so somehow above folder will not add in your project and that's why it's not building your iOS project.
To overcome this issue you need to remove iOS platform from your ionic project and again add it.
Remove iOS platform: sudo ionic cordova platform remove ios
Add it again: sudo ionic cordova platform add ios
By doing this cordova download CordovaLib folder from server and add it into your iOS project and after that users can able to build their project without any error.
recently I faced this issue and I solved by doing the above steps.
Hope this helps others.
Happy coding!
Seems like the "Cordova" folder isn't getting copied into the project during cordova platform add ios
So, you'll have to copy the "Cordova" source folder into your project manually. But you'll have to download the ios source packages from github first, which is located at:
https://github.com/apache/cordova-ios
After downloading the "cordova-ios-master.zip" package and unzipping it, copy the folder named "CordovaLib" into your project next to the Xcode project file:
PROJECT_FOLDER/platforms/ios/PROJECT_NAME
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcodeproj
PROJECT_FOLDER/platforms/ios/PROJECT_NAME.xcworkspace
PROJECT_FOLDER/platforms/ios/cordova
PROJECT_FOLDER/platforms/ios/CordovaLib <------- here
PROJECT_FOLDER/platforms/ios/ios.json
PROJECT_FOLDER/platforms/ios/platform_www
PROJECT_FOLDER/platforms/ios/pods-debug.xcconfig
PROJECT_FOLDER/platforms/ios/pods-release.xcconfig
PROJECT_FOLDER/platforms/ios/www

Resources