Here's my environment:
➜ AwesomeProject node --version v6.3.0 ➜ AwesomeProject npm --version 3.10.3 ➜ AwesomeProject react-native --version react-native-cli: 1.0.0 react-native: 0.29.0 ➜ AwesomeProject watchman --version 3.0.0
Xcode version 7.3.1
I created the AwesomeProject
described on: https://facebook.github.io/react-native/docs/getting-started.html#content
Then execute: sudo react-native run-ios
Here's what I'm getting:
... export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions export SYSTEM_LIBRARY_DIR=/System/Library export TAPI_VERIFY_MODE=ErrorsOnly export TARGETED_DEVICE_FAMILY=1 export TARGETNAME=AwesomeProject export TARGET_BUILD_DIR=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator export TARGET_DEVICE_MODEL=iPhone7,2 export TARGET_DEVICE_OS_VERSION=9.3 export TARGET_NAME=AwesomeProject export TARGET_TEMP_DIR=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build export TEMP_DIR=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build export TEMP_FILES_DIR=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build export TEMP_FILE_DIR=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build export TEMP_ROOT=/Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO export UID=0 export UNLOCALIZED_RESOURCES_FOLDER_PATH=AwesomeProject.app export UNSTRIPPED_PRODUCT=NO export USER=root export USER_APPS_DIR=/var/root/Applications export USER_LIBRARY_DIR=/var/root/Library export USE_DYNAMIC_NO_PIC=YES export USE_HEADERMAP=YES export USE_HEADER_SYMLINKS=NO export VALIDATE_PRODUCT=NO export VALID_ARCHS="i386 x86_64" export VERBOSE_PBXCP=NO export VERSIONPLIST_PATH=AwesomeProject.app/version.plist export VERSION_INFO_BUILDER=root export VERSION_INFO_FILE=AwesomeProject_vers.c export VERSION_INFO_STRING="\"@(#)PROGRAM:AwesomeProject PROJECT:AwesomeProject-\"" export WRAPPER_EXTENSION=app export WRAPPER_NAME=AwesomeProject.app export WRAPPER_SUFFIX=.app export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode export XCODE_PRODUCT_BUILD_VERSION=7D1014 export XCODE_VERSION_ACTUAL=0731 export XCODE_VERSION_MAJOR=0700 export XCODE_VERSION_MINOR=0730 export XPCSERVICES_FOLDER_PATH=AwesomeProject.app/XPCServices export YACC=yacc export arch=x86_64 export diagnostic_message_length=124 export variant=normal /bin/sh -c /Users/glaksmono/Documents/React/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Script-00DD1BFF1BD5951E006B06BC.sh Skipping bundling for Simulator platform === BUILD TARGET AwesomeProjectTests OF PROJECT AwesomeProject WITH CONFIGURATION Debug === Check dependencies ** BUILD SUCCEEDED ** Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app No devices are booted. Launching org.reactjs.native.example.AwesomeProject No devices are booted.
And the iOS iPhone 6 simulator is just showing a black screen.
Ideas?
When hitting react-native run-ios
, one of the first lines printed to console, would be something like this (or similar)
Launching iPhone 6 (10.0)...
react-native run-ios
againI have just solved the same question.
First try using react-native run-ios
instead of the sudo react-native run-ios
.
Next try the following:
In file AppDelegate.m
, change
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
To:
jsCodeLocation = [NSURL URLWithString:@"http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true"];
(This may be a security issue with iOS 9);
Next try to reset your env.
I have the same problem when first time to run react-native run-ios
Try Hardware -> Reboot the simulator, and run it again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With