Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0 - React Native, VS Code

Hey Stackoverflow community,

I am completely new to React Native and already struggling in the first step. I have done everything according to this site: https://reactnative.dev/docs/environment-setup

I have installed node and watchman I have X Code running for the simulation I have installed cocoa pods The editor I am using is VS Code and the terminal is iTerm.

I created a test project like described in the doc.

npx react-native init AwesomeProject

After that, I went inside the folder and ran in two different terminals.

npx react-native start
npx react-native run-ios

When I watch people doing this on Youtube it always works, but what I get is the following:

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.4.99. (in target 'boost-for-react-native' from project 'Pods')
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.4.99. (in target 'YogaKit' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.4, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Flipper-PeerTalk' from project 'Pods')
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.4.99. (in target 'Flipper-Glog' from project 'Pods')
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.4.99. (in target 'Flipper-DoubleConversion' from project 'Pods')
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')

** BUILD FAILED **


The following build commands failed:
    CompileC /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/mw/Desktop/AwesomeProject/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

I would be super happy if someone could help me with this problem. I have seen some other posts on Stackoverflow, but nothing helped.

Thank you very much

UPDATE

After I have make I have changed

cd AwesomeProject/ios
a) Comment this line in Podfile
   # use_flipper!()
b) pod install

With running:

npx react-native run-ios

I am getting this error message:

    /bin/sh -c /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.sh
N/A: version "N/A -> N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.
Command PhaseScriptExecution failed with a nonzero exit code

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')
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.4.99. (in target 'boost-for-react-native' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/mw/Library/Developer/Xcode/DerivedData/AwesomeProject-hdnnulyuswlwrafjfjkeikstoeak/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-90F0FABA0342DD788075D851B9320B7C.sh
(1 failure)

Researching about this error message I came along that it could have something to do with NodeJS, but Node is installed.

like image 686
M-WRI Avatar asked May 03 '21 15:05

M-WRI


People also ask

How do I change iOS deployment target in react native?

Click on pods. Select each project and target and click on build settings. Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version).

Is set to 8.0 but the range of supported deployment target versions is?

The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'FirebaseInstallations' from project 'Pods')

How do I run react native on specific iOS simulator?

Specifying a device​ You can specify the device the simulator should run with the --simulator flag, followed by the device name as a string. The default is "iPhone 13" . If you wish to run your app on an iPhone SE (2nd generation), run npx react-native run-ios --simulator='iPhone SE (2nd generation)' .

What is iOS deployment target?

In short, every application that runs on one of Apple's platforms has a deployment target. A deployment target is nothing more than the minimum version of the operating system the application can run on. Fire up Xcode and create a new project by choosing the App template from the iOS > Application section.


2 Answers

You need an additional step :

1) npx react-native init AwesomeProject

2) cd AwesomeProject/ios
   a) Comment this line in Podfile
      # use_flipper!()
   b) pod install

3) cd ..
   npx react-native run-ios
like image 149
Philippe Avatar answered Nov 12 '22 01:11

Philippe


I faced the same issue in an already exisiting project. In this project Flipper is necessary, so commenting it out in the Podfile didn't solved the issue.

This comment with an instruction depending on the React Native version helped me to get the project back running in the iOS emulator: https://github.com/facebook/react-native/issues/31179#issuecomment-830184757

like image 23
Alexander Hodes Avatar answered Nov 12 '22 01:11

Alexander Hodes