1

I'm start learning react-native and i'm having some trouble setting-up the environment, and i have some questions regarding that:

First when i write:

npx react-native init new_app

I get an error, that error says try:

cd ./new_app/ios && pod install

Then I get the following error:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/macbookpro/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details

I know I need to install Xcode, but I don't want to now for some reasons, so is there anything i can do to make it work without Xcode installed ?

Second Question, How can I initialize a react-native app just for Android first ? and if there's a way for that, when i want to build the IOS app, Will i get some troubles or just i need Xcode then build the same android code for IOS ? or should the environment be ready for IOS and Android then start working on your App ?

1 Answer 1

1

To answer your first question, Xcode is required if you want to build your app for IOS unfortunately.

To answer your other question, it is perfectly possible to build for android and not IOS. Their build processes run largely independently from one another. I'll save you from going over all the steps of building and developing for android here, but the documentation should give you all you need. https://reactnative.dev/docs/running-on-device

Sign up to request clarification or add additional context in comments.

2 Comments

So i can start first by android and when i finish the app for android, then if i want to install XCode and build the app for IOS is okeey, there's not risk if the environment is not ready for IOS like the error shown above ?
Naturally you'll have to work through configuration to make sure that error doesn't happen when you do build for IOS, but the act of building for android will not be the cause of those problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.