Unable to run react-native app on iOS12 device with xcode10
See original GitHub issueEnvironment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Memory: 474.75 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.1 - ~/.nvm/versions/node/v8.11.1/bin/node
Yarn: 1.7.0 - /usr/local/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v8.11.1/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.1, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1
System Images: android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
react-native: 0.57.4 => 0.57.4
npmGlobalPackages:
react-native-cli: 2.0.1
Iphone info:
Iphone X, iOS version 12.0 (16A366)
Description
The issue started after upgrading to xcode 10 and building for iOS 12 devices. First occurred in an existing project, therefor decided to try it out with a new one. Both existing project and new app are building perfectly fine for simulator, but when building for a device two things happen:
- The error message "Could not launch projectname. Iphonename’s iphone had denied the launch request.
- Connection with bundler is lost right away, therefor no errors in both xcode and metro bundler.
- The app is stuck on launch screen.
Extra notes
-
After removing the “Apple Worldwide Developer Relations Certification Authority” certificate (see: https://stackoverflow.com/questions/52415694/ipad-has-denied-the-launch-request-after-update-to-ios-12) from keychain: the app just closes right away after launch. Again, connection with bundler is lost right away, therefor no errors in both xcode and metro bundler.
-
Actually, sometimes the app even completely freezes the entire device, it becomes unresponsive for several minutes.
-
I have tried it with multiple iOS12 devices. Have tried both legacy built settings and new (xcode10) built settings. Both fail for device.
-
It does built on a device for iOS 11.
-
Very occasionally (2 times out of 30) the app did start bundling and building after waiting for for 1/2 minutes. The following appeared in the logs:
2018-11-09 10:40:42.353351+0100 testapp[321:8597] XPC connection interrupted
2018-11-09 10:41:29.267063+0100 testapp[321:8597] NSURLConnection finished with error - code -1001
2018-11-09 10:41:29.285642+0100 testapp[321:8593] Task <D2118C0E-6B2F-46AA-9D8B-F6CD56B041EE>.<0> HTTP load failed (error code: -999 [1:89])
2018-11-09 10:41:29.285 [info][tid:main][RCTCxxBridge.mm:216] Initializing <RCTCxxBridge: 0x281a18000> (parent: <RCTBridge: 0x280e185b0>, executor: (null))
2018-11-09 10:41:29.289055+0100 testapp[321:8531] Initializing <RCTCxxBridge: 0x281a18000> (parent: <RCTBridge: 0x280e185b0>, executor: (null))
2018-11-09 10:41:29.429068+0100 testapp[321:8592] [] nw_socket_handle_socket_event [C2.1:1] Socket SO_ERROR [61: Connection refused]
2018-11-09 10:41:29.431 [info][tid:main][RCTRootView.m:293] Running application testapp ({
initialProps = {
};
rootTag = 1;
})
2018-11-09 10:41:29.430976+0100 testapp[321:8531] Running application testapp ({
initialProps = {
};
rootTag = 1;
})
2018-11-09 10:41:29.431317+0100 testapp[321:8592] [] nw_socket_handle_socket_event [C2.2:1] Socket SO_ERROR [61: Connection refused]
2018-11-09 10:41:29.431652+0100 testapp[321:8591] [] nw_connection_get_connected_socket [C2] Client called nw_connection_get_connected_socket on unconnected nw_connection
2018-11-09 10:41:29.431701+0100 testapp[321:8591] TCP Conn 0x2810183c0 Failed : error 0:61 [61]
Note the 'HTTP load failed and then the app started building.
Reproducible Demo
Steps:
- react native init projectname
- cd ./projectname && yarn
- open ./ios/zwangerhapapp.xcodeproj
- Create app id and ad hoc provisioning profile for new app. Apply these in the new project and remove tvOS/tvOSTests/Tests targets.
- Built app for connected iOS12 device.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top GitHub Comments
https://stackoverflow.com/questions/45421179/xcode-9-error-iphone-has-denied-the-launch-request
See the second answer:
“I tracked this problem down to the “debug executable” checkbox in the product scheme (product->scheme->edit scheme->info->debug executable checkbox). I unchecked that and this stopped happening (as well as a couple other weird issues - no output in console being one).”
This fixed all issues for me, but it’s not optimal since the connection with the xcode debugger is lost.
+1