Cannot run react-native app directly on iPhone (deployment target errors)

react-native run-ios device not working
flutter ios deployment target
react-native run-ios device
deploy react native app to iphone
xcodebuild dtdevicekit devicetype null
react-native iphoneos_deployment_target
dtdevicekit: devicetype from was null nativescript
com apple dtdevicekit

The problem

When I run react-native in Simulator it works fine. I am now trying to run it on my iPhone directly connected to my MacBook but issues are coming up. There are several warnings that say the Deployment Target is set to 7.0.

Where exactly is this being set? IS it being set in the libraries that I am using? How do I get around this?

Similar information I have found that do not seem to be duplicates of this issue include:

  • People having issues with the simulator (the simulator is working fine for me)
  • Suggestions for people to use the Legacy Build system in XCode (which others are saying is not a good idea).

So, what exactly is causing this issue and what do I do to fix it so that I can run the app on my physical iPhone device?

The error messages:

ThePrompt$ react-native run-ios --device "Fred’s iPhone"

warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - react-native-zip-archive: https://github.com/mockingbot/react-native-zip-archive
  - rn-fetch-blob: https://npmjs.com/package/rn-fetch-blob Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. 
info Found Xcode workspace "TestAppApp07.xcworkspace" 
info Building (using "xcodebuild -workspace TestAppApp07.xcworkspace -configuration Debug -scheme TestAppApp07 -destination id=1e8ce3b4030eadba1161bda6bc1109b1e215f1ca -derivedDataPath build/TestAppApp07") 
....................... 
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 TestAppApp07.xcworkspace. Run CLI with 
--verbose flag for more details. 
User defaults from command line:
    IDEDerivedDataPathOverride = /opt/TestAppApp07/ios/build/TestAppApp07

note: Using new build system
note: Planning build 
note: Constructing build description 
Build system information 
error: Signing for "TestAppApp07Tests" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07Tests')

Build system information 
error: Signing for "TestAppApp07" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNFS')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNGestureHandler')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNScreens')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNSound')


2019-08-15 00:01:44.888 xcodebuild[36925:1330679]  DTDeviceKit: deviceType from 1e8ce3b4030eadba1161bda8ac1109b1e215f1us was NULL
2019-08-15 00:01:44.927 xcodebuild[36925:1330675]  DTDeviceKit: deviceType from 1e8ce3b4030eadba1161bda8ac1109b1e215f1us was NULL
** BUILD FAILED **

The issue?

It seems that React Native is only supporting a deployment target of 7.0. However, the newer version of XCode no longer has 7.0 as a target option. The lowest target in new versions of XCode is 8.0.

Legacy Build?

Some of the issues I see say I can use Legacy Build instead. However, I am wondering if this is will cause any other issues.

I think the problem is the development team:

Build system information error: Signing for "TestAppApp07Tests" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07Tests')

Build system information error: Signing for "TestAppApp07" requires a development team. Select a development team in the project editor. (in target 'TestAppApp07')

Just set a valid development team. If you don't have one, create it. After setting a correct development team it should work.

Make sure you set the team for both targets: TestAppApp07 and TestAppApp07Tests

https://www.twilio.com/blog/2018/07/how-to-test-your-ios-application-on-a-real-device.html

https://developer.apple.com/support/teams/

About the deployment target:

If the problem related to deployment target is related to some old dependencies I think you can use the Legacy build system.

From what I know Xcode 8 or newer has no support for deployment target iOS 7.0.

Xcode 11.3: can't select deployment target 13.3, Cannot run react-native app directly on iPhone (deployment target errors) (in target 'TestAppApp07Tests') Build system information error:  You can also use the React Native CLI to perform this operation using the option --configuration with the value Release (e.g. npx react-native run-ios --configuration Release). Building your app for production. You have built a great app using React Native, and you are now itching to release it in the Play Store.

So the fix will you need to set the deployment target of device version you are using.

If project deployment target has been set to 8 then you can not run it on iOS 7 or below it. Make sure you should have set the minimum deployment target which you want to support. That is can be set in below window.

Build an iOS App with React Native and Publish it to the App Store , Today I updated Xcode to version 11.3 to build my app for iOS 13.3. I opened my project but couldn't find the iOS deployment target 13.3 when When I manually change the version string in the project file, I obviously run into build I am also trying to build my app on iOS 13.3 with xcode 11.3, but below error is coming :. From here you should be able to say react-native run-android to deploy to an emulator or attached Android phone. Everything should work fine. Configure Authentication for Your React Native iOS App. Right now when you click Login you will be taken to an Okta login page. This is connected to an Okta account I used for development.

Try:

appc run -p ios -T device

If the issue persist then try with the following steps

  1. Delete certificate from the login keychain and try with the newly created certificate and provisioning profile.
  2. Reconnect the device

How do I acquire SDKs to build target pre-8.0 iOS?, How do I run an IOS app in react native? 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 X". If you wish to run your app on an iPhone 5s, run npx react-native run-ios --simulator="iPhone 5s". The device names correspond to the list of devices available in Xcode.

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNFS')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNGestureHandler')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNScreens')

Build system information
warning: The iOS deployment target is set to
7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNSound')

It is clearly saying that your deployment target is set to 7.0, but Xcode support starts from 8.0. To set the deployment target.

  1. Open Project settings.
  2. Select Target Your project name
  3. Choose General
  4. Go to Deployment info -> Deployment Targer

If you still find errors, then check for your third-party frameworks for compatibility issues.

Try to avoid legacy system build, because it might comes with several other issues in device.

React native run-ios 0.57.x is broken · Issue #21741 · facebook/react , React Native Build Failed react-native run-ios #21631 It's probably important to note that I'm building directly from xcode 10 on a project started with 0.57.1 and error: Build input file cannot be found: For me, this problem was caused by upgrading my app's Deployment Target ios sdk from version 11.4  Last week I deployed a React Native iOS app to the App Store. In total, the deployment process took about 2 hours — going through the tedium of collecting screenshots and icons, testing the app

React native, error React Native CLI uses autolinking for native dependencies, but the following modules react-native-inappbrowser-reborn (to unlink run: "react-​native unlink consider building your app with Xcode.app, by opening devhub.​xcworkspace. warning: The iOS Simulator deployment target is set to 7.0, but the range of  When installing or using react-native-device-info, you may encounter the following problems: [android] - Unable to merge dex / Multiple dex files / Problems with `com.google.android.gms` react-native-device-info uses com.google.android.gms:play-services-gcm to provide [getInstance()][#getinstance]. This can lead to conflicts when building the

How to test React Native App on a real iPhone, I have been developing a new iOS app using React Native. If your iPhone is running iOS 7.0 and you have set “Deployment Target” as 8.0 then the app will not Step 3 - Fix “Could not connect to development server” error. This is how you can run the React Native App on Real Device. In some cases, it becomes too hectic to manage cable all the time so there is another solution to Connect Your device with the development server using Wi-Fi. This is how you can run React Native App on Real Device. If you have anything to share please comment below or contact us here.

Debugging common React Native issues on iOS, We assume that you know how to develop apps with React Native. Once that's done, execute npm install again and re-run the project. If you see the error “​Application {your project name} has not been it's peer dependency doesn't include React Native version 0.55 : Set Team for Each Target. Select "iPhone X" as your built target; Run; Result. The react-native build configure: error: C compiler cannot create executables See `config.log' for more

Comments
  • The problem is that the target has 8.0 as the lowest possible target.
  • Try: Adding a new simulator with iOS 7 version if works then fine otherwise you have to use a lower version of XCode
  • @kojow7: are you able to run other app in device? as per error message it's related to setup signing identity issue to run the app in device. So can you please check development , provisioning is right or not?
  • @Shubham I think the problem is that React Native is set for a target of 7.0 but xCode's lowest target is 8.0.
  • New versions of xCode are not able to be set to 7.0.
  • True, they don't support iOS 7.0. Minimum deployment target is 8.0 If you see practically, there are very rare devices running iOS 7.0. Along with that, all your RNFS, RNGestureHandler, RNScreens, RNSound targets have minimum deployment target of 8.0 @kojow7