React Native build fails in terminal but runs fine in Xcode - react-native

When i try to run my react-native build in the terminal i get this error:
clang-4.0: error: no such file or directory: '/Users/myname/project-x/ios/build/ProjectX/Index/DataStore'
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 ProjectX.xcworkspace
failed build-command info:
The following build commands failed:
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum-dtoa.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/danstein/project-x/ios/build/ProjectX/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/myname/project-x/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
This is working for the other guy on my team. And everything builds and runs fine in Xcode.
I sometimes have problems running create-react-app because I use an anaconda python installation, so I have to 'kill HOST' but this doesn't solve this problem

go to your AppDelegate.m file and change jsCodeLocation.

Related

Bare react native project does not run on ios simulator

I am trying to run an a fresh react native project using react native cli but I get the following error:
2022-07-22 09:31:45.006 xcodebuild[96346:8084479] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-22 09:31:45.006 xcodebuild[96346:8084479] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
CompileC /Users/ramiel/Library/Developer/Xcode/DerivedData/AwesomeProject-dcybszwqvhaflbhahawancnnffvo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/ramiel/Desktop/Typescript/react\ native/AwesomeProject/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'YogaKit' from project 'Pods')
(2 failures)
I appreciate any help
install the cocoapods for ios using the command sudo gem install cocoapods
after installation navigate to the ios folder and run pod install. then you can run your project using npx react-native run-ios
For some reason. I created a new typescript project and it worked :)

react-native-firebase/app ios installation Error

after installing react-native frebase/app it works well for android , but in case of ios ...use of cd ios && pod install ..then pod is not installed ...follow the official documentation Altering CocoaPods to use frameworks
Beginning with firebase-ios-sdk v9+ (react-native-firebase v15+) you must tell CocoaPods to use frameworks.
Open the file ./ios/Podfile and add this line inside your targets:
use_frameworks!
To use Static Frameworks on iOS, you also need to manually enable this for the project with the following global to the top of your /ios/Podfile file:
$RNFirebaseAsStaticFramework = true...
is it same folder ./ios/podfile and /ios/podfile ?
then also not installed the pod and then use of
$RNFirebaseAsStaticFramework = true
use_modular_headers!
at the top of the pod file
and finally pod is installed but when build using npx react-native run-ios and then give a long error
Command CompileSwiftSources failed with a nonzero exit code
2022-07-05 16:47:46.163 xcodebuild[11109:198292] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-07-05 16:47:46.163 xcodebuild[11109:198292] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
The following build commands failed:
CompileC /Users/arindam/Library/Developer/Xcode/DerivedData/DemoChat-cttmfseavejzhadnawolzvwrzelz/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsi.build/Objects-normal/x86_64/JSIDynamic.o /Users/arindam/Documents/test_projects/DemoChat/node_modules/react-native/ReactCommon/jsi/jsi/JSIDynamic.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-jsi' from project 'Pods')
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'YogaKit' from project 'Pods')
(2 failures)
please help i am new to react native...how to solve the issue...
follow this.
xcode command line build failed with com.apple.compilers.llvm.clang.1_0.compiler
if above doesnt work, downgrade firebase version.
ie. package.json
"#react-native-firebase/app": "^12.9.0", // version 12 works great for me, but i get your error when i run version 15.

Build Failed after importing ios module in Appcelerator App

I am creating FBAudienceNetwork.framework module for iOS in appcelerator then using it in mobile App but getting compilation error for app.
I have created a module in appcelerator studio, i have put the FBAudienceNetwork.framework in module inside ios/patform folder, the module built successfully.
Then i am importing that module in appcelerator project while compiling it shows an error.
I have also follow this link : https://docs.axway.com/bundle/Titanium_SDK_allOS_en/page/ios_module_64-bit_support.html
The command lists the required architectures.
xcrun lipo -info libcom.usp.fbaudience.a
Architectures in the fat file: libcom.usp.fbaudience.a are: armv7 i386 x86_64 arm64
Xcode Version : 10.1
Titanium SDK : 8.0.0.GA
var facebookAudienceNetwork = require('com.usp.fbaudiancenetwork');
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld /Users/uspapps4/Documents/workspace2/fbAudienceNetworkDemo/build/iphone/build/Intermediates/fbAudienceNetworkDemo.build/Debug-iphoneos/fbAudienceNetworkDemo.build/Objects-normal/armv7/fbAudienceNetworkDemo normal armv7.

react-native build failed (run-ios)

I try to pass from CRNA to React-Native application with native code. When i build with react-native run-ios, the build failed and i don't know what to do!
** BUILD FAILED **
The following build commands failed:
CompileC /Users/Karl/Documents/Applications/MyItems51Work/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/raw_logging.o /Users/Karl/Documents/Applications/MyItems51Work/node_modules/react-native/third-party/glog-0.3.4/src/raw_logging.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/MyItems.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/MyItems.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Linking issues is usually misleading, and not easy to debug:
this question has very good practices to avoid these kind of issues.

Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist

react-native-cli: 1.0.0
react-native: 0.39.2
I cloned a react native project. Then I ran npm install and then react-native run-ios. The project fails with the below error.
Please not the project runs fine in xcode.
Any thoughts?
The following commands produced analyzer issues:
Analyze RCTLocationObserver.m
(1 command with analyzer issues)
The following build commands failed:
CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTLinking.build/Debug-iphonesimulator/RCTLinking.build/Objects-normal/x86_64/RCTLinkingManager.o RCTLinkingManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTGeolocation.build/Debug-iphonesimulator/RCTGeolocation.build/Objects-normal/x86_64/RCTLocationObserver.o RCTLocationObserver.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/jordanmc/Documents/src/Safetypin%20React-Native/ios/build/Build/Intermediates/RCTText.build/Debug-iphonesimulator/RCTText.build/Objects-normal/x86_64/RCTTextManager.o RCTTextManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
Installing build/Build/Products/Debug-iphonesimulator/Safetypin.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/Safetypin.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
So, I had the same problem Jordan. react-native run-ios creates the Products & Intermediates folder in the ./ios/build folder, but the issue is the valid path is pointing to ./ios/build/Build. What I've been doing is I manually create the Build/ folder inside ./ios/build by issuing the command below:
cd ./ios/build
mkdir Build
cd Build
then, I symlink the folders:
ln -s ../Products .
ln -s ../Intermediates .
You should be able to get react-native run-ios to work again.