最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】ReactNative iOS运行出错:No bundle URL present

iOS crifan 10293浏览 0评论

 折腾:

【记录】React Native iOS添加导航栏和列表

期间,参考:

Navigator

结果用代码:

import React, { Component } from ‘react’;
import { Text, Navigator, TouchableHighlight } from ‘react-native’;
export default class NavAllDay extends Component {
    render() {
        return (
            <Navigator
                initialRoute={{ title: ‘Awesome Scene’, index: 0 }}
                renderScene={(route, navigator) =>
          <Text>Hello {route.title}!</Text>
        }
                style={{padding: 100}}
            />
        );
    }
}

出错:

react native No bundle URL present

但是先看看,最基本的教程:

Tutorial

Using Navigators

后来去试了试其他的代码,包括最原始之前可以正常运行的代码,结果都还是同样错误

-》感觉不是代码的问题了。是环境和配置的问题了。

No bundle url present · Issue #12754 · facebook/react-native · GitHub

ios – What means of no bundle URL present in react-native? – Stack Overflow

在iOS模拟器正在运行期间,去:

npm install

react-native run-ios

输出内容很长:

➜  AwesomeProject npm install
➜  AwesomeProject react-native run-ios
Scanning 551 folders for symlinks in /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/node_modules (6ms)
Found Xcode project AwesomeProject.xcodeproj
We couldn’t boot your defined simulator due to an already booted simulator. We are limited to one simulator launched at a time.
Launching iPhone 7 (iOS 10.0)…
Building using "xcodebuild -project AwesomeProject.xcodeproj -configuration Debug -scheme AwesomeProject -destination id=B7A23C05-A94A-4CD0-804A-149EEA31A4D7 -derivedDataPath build"
User defaults from command line:
    IDEDerivedDataPathOverride = /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build
=== BUILD TARGET yoga OF PROJECT React WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET jschelpers OF PROJECT React WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET cxxreact OF PROJECT React WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET React OF PROJECT React WITH CONFIGURATION Debug ===
Check dependencies
PhaseScriptExecution Start\ Packager /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
    cd /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/node_modules/react-native/React
    /bin/sh -c /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
Connection to localhost port 8081 [tcp/sunproxyadmin] succeeded!
PhaseScriptExecution Include\ RCTJSCProfiler /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-142C4F7F1B582EA6001F0B58.sh
    cd /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/node_modules/react-native/React
    /bin/sh -c /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-142C4F7F1B582EA6001F0B58.sh
=== BUILD TARGET RCTGeolocation OF PROJECT RCTGeolocation WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTImage OF PROJECT RCTImage WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTAnimation OF PROJECT RCTAnimation WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTSettings OF PROJECT RCTSettings WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTLinking OF PROJECT RCTLinking WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTWebSocket OF PROJECT RCTWebSocket WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTActionSheet OF PROJECT RCTActionSheet WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTNetwork OF PROJECT RCTNetwork WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTText OF PROJECT RCTText WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET RCTVibration OF PROJECT RCTVibration WITH CONFIGURATION Debug ===
Check dependencies
=== BUILD TARGET AwesomeProject OF PROJECT AwesomeProject WITH CONFIGURATION Debug ===
Check dependencies
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Script-00DD1BFF1BD5951E006B06BC.sh
    cd /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios
    export ACTION=build
    export AD_HOC_CODE_SIGNING_ALLOWED=YES
    export ALTERNATE_GROUP=staff
    export ALTERNATE_MODE=u+w,go-w,a+rX
    export ALTERNATE_OWNER=crifan
    export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
    export ALWAYS_SEARCH_USER_PATHS=NO
    export ALWAYS_USE_SEPARATE_HEADERMAPS=NO
    export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
    export APPLE_INTERNAL_DIR=/AppleInternal
    export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
    export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
    export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
    export APPLICATION_EXTENSION_API_ONLY=NO
    export APPLY_RULES_IN_COPY_FILES=NO
    export ARCHS=x86_64
    export ARCHS_STANDARD="i386 x86_64"
    export ARCHS_STANDARD_32_64_BIT="i386 x86_64"
    export ARCHS_STANDARD_32_BIT=i386
    export ARCHS_STANDARD_64_BIT=x86_64
    export ARCHS_STANDARD_INCLUDING_64_BIT="i386 x86_64"
    export ARCHS_UNIVERSAL_IPHONE_OS="i386 x86_64"
    export ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon
    export AVAILABLE_PLATFORMS="appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"
    export BITCODE_GENERATION_MODE=marker
    export BUILD_ACTIVE_RESOURCES_ONLY=YES
    export BUILD_COMPONENTS="headers build"
    export BUILD_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products
    export BUILD_ROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products
    export BUILD_STYLE=
    export BUILD_VARIANTS=normal
    export BUILT_PRODUCTS_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator
    export CACHE_ROOT=/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/C/com.apple.DeveloperTools/8.0-8A218a/Xcode
    export CCHROOT=/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/C/com.apple.DeveloperTools/8.0-8A218a/Xcode
    export CHMOD=/bin/chmod
    export CHOWN=/usr/sbin/chown
    export CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
    export CLANG_CXX_LIBRARY=libc++
    export CLANG_ENABLE_MODULES=YES
    export CLANG_ENABLE_OBJC_ARC=YES
    export CLANG_MODULES_BUILD_SESSION_FILE=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/ModuleCache/Session.modulevalidation
    export CLANG_WARN_BOOL_CONVERSION=YES
    export CLANG_WARN_CONSTANT_CONVERSION=YES
    export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR
    export CLANG_WARN_EMPTY_BODY=YES
    export CLANG_WARN_ENUM_CONVERSION=YES
    export CLANG_WARN_INT_CONVERSION=YES
    export CLANG_WARN_OBJC_ROOT_CLASS=YES_ERROR
    export CLANG_WARN_UNREACHABLE_CODE=YES
    export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
    export CLASS_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/JavaClasses
    export CLEAN_PRECOMPS=YES
    export CLONE_HEADERS=NO
    export CODESIGNING_FOLDER_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
    export CODE_SIGNING_ALLOWED=YES
    export CODE_SIGN_CONTEXT_CLASS=XCiPhoneSimulatorCodeSignContext
    export CODE_SIGN_IDENTITY=-
    export COLOR_DIAGNOSTICS=NO
    export COMBINE_HIDPI_IMAGES=NO
    export COMMAND_MODE=legacy
    export COMPOSITE_SDK_DIRS=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/CompositeSDKs
    export COMPRESS_PNG_FILES=YES
    export CONFIGURATION=Debug
    export CONFIGURATION_BUILD_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator
    export CONFIGURATION_TEMP_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator
    export CONTENTS_FOLDER_PATH=AwesomeProject.app
    export COPYING_PRESERVES_HFS_DATA=NO
    export COPY_HEADERS_RUN_UNIFDEF=NO
    export COPY_PHASE_STRIP=NO
    export COPY_RESOURCES_FROM_STATIC_FRAMEWORKS=YES
    export CORRESPONDING_DEVICE_PLATFORM_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
    export CORRESPONDING_DEVICE_PLATFORM_NAME=iphoneos
    export CORRESPONDING_DEVICE_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk
    export CORRESPONDING_DEVICE_SDK_NAME=iphoneos10.0
    export CP=/bin/cp
    export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
    export CURRENT_ARCH=x86_64
    export CURRENT_PROJECT_VERSION=1
    export CURRENT_VARIANT=normal
    export DEAD_CODE_STRIPPING=NO
    export DEBUGGING_SYMBOLS=YES
    export DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
    export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
    export DEFAULT_KEXT_INSTALL_PATH=/System/Library/Extensions
    export DEFINES_MODULE=NO
    export DEPLOYMENT_LOCATION=NO
    export DEPLOYMENT_POSTPROCESSING=NO
    export DEPLOYMENT_TARGET_CLANG_ENV_NAME=IPHONEOS_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_CLANG_FLAG_NAME=mios-simulator-version-min
    export DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX=-mios-simulator-version-min=
    export DEPLOYMENT_TARGET_SETTING_NAME=IPHONEOS_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_SUGGESTED_VALUES="8.0 8.1 8.2 8.3 8.4 9.0 9.1 9.2 9.3 10.0"
    export DERIVED_FILES_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/DerivedSources
    export DERIVED_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/DerivedSources
    export DERIVED_SOURCES_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/DerivedSources
    export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
    export DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    export DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
    export DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export DEVELOPMENT_LANGUAGE=English
    export DOCUMENTATION_FOLDER_PATH=AwesomeProject.app/English.lproj/Documentation
    export DO_HEADER_SCANNING_IN_JAM=NO
    export DSTROOT=/tmp/AwesomeProject.dst
    export DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export DWARF_DSYM_FILE_NAME=AwesomeProject.app.dSYM
    export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
    export DWARF_DSYM_FOLDER_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator
    export EFFECTIVE_PLATFORM_NAME=-iphonesimulator
    export EMBEDDED_CONTENT_CONTAINS_SWIFT=NO
    export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE=NO
    export ENABLE_BITCODE=NO
    export ENABLE_DEFAULT_HEADER_SEARCH_PATHS=YES
    export ENABLE_HEADER_DEPENDENC
IES=YES
    export ENABLE_ON_DEMAND_RESOURCES=YES
    export ENABLE_STRICT_OBJC_MSGSEND=YES
    export ENABLE_TESTABILITY=NO
    export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
    export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
    export EXECUTABLES_FOLDER_PATH=AwesomeProject.app/Executables
    export EXECUTABLE_FOLDER_PATH=AwesomeProject.app
    export EXECUTABLE_NAME=AwesomeProject
    export EXECUTABLE_PATH=AwesomeProject.app/AwesomeProject
    export EXPANDED_CODE_SIGN_IDENTITY=-
    export EXPANDED_CODE_SIGN_IDENTITY_NAME=-
    export EXPANDED_PROVISIONING_PROFILE=
    export FILE_LIST=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Objects/LinkFileList
    export FIXED_FILES_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/FixedFiles
    export FRAMEWORKS_FOLDER_PATH=AwesomeProject.app/Frameworks
    export FRAMEWORK_FLAG_PREFIX=-framework
    export FRAMEWORK_SEARCH_PATHS="/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator "
    export FRAMEWORK_VERSION=A
    export FULL_PRODUCT_NAME=AwesomeProject.app
    export GCC3_VERSION=3.3
    export GCC_C_LANGUAGE_STANDARD=gnu99
    export GCC_DYNAMIC_NO_PIC=NO
    export GCC_INLINES_ARE_PRIVATE_EXTERN=YES
    export GCC_OBJC_LEGACY_DISPATCH=YES
    export GCC_OPTIMIZATION_LEVEL=0
    export GCC_PFE_FILE_C_DIALECTS="c objective-c c++ objective-c++"
    export GCC_PREPROCESSOR_DEFINITIONS="DEBUG=1 "
    export GCC_SYMBOLS_PRIVATE_EXTERN=NO
    export GCC_TREAT_WARNINGS_AS_ERRORS=NO
    export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
    export GCC_VERSION_IDENTIFIER=com_apple_compilers_llvm_clang_1_0
    export GCC_WARN_64_TO_32_BIT_CONVERSION=YES
    export GCC_WARN_ABOUT_RETURN_TYPE=YES_ERROR
    export GCC_WARN_UNDECLARED_SELECTOR=YES
    export GCC_WARN_UNINITIALIZED_AUTOS=YES_AGGRESSIVE
    export GCC_WARN_UNUSED_FUNCTION=YES
    export GCC_WARN_UNUSED_VARIABLE=YES
    export GENERATE_MASTER_OBJECT_FILE=NO
    export GENERATE_PKGINFO_FILE=YES
    export GENERATE_PROFILING_CODE=NO
    export GENERATE_TEXT_BASED_STUBS=NO
    export GID=20
    export GROUP=staff
    export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
    export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
    export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
    export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
    export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
    export HEADERMAP_USES_VFS=NO
    export HEADER_SEARCH_PATHS="/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/include "
    export HIDE_BITCODE_SYMBOLS=YES
    export HOME=/Users/crifan
    export ICONV=/usr/bin/iconv
    export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
    export INFOPLIST_FILE=AwesomeProject/Info.plist
    export INFOPLIST_OUTPUT_FORMAT=binary
    export INFOPLIST_PATH=AwesomeProject.app/Info.plist
    export INFOPLIST_PREPROCESS=NO
    export INFOSTRINGS_PATH=AwesomeProject.app/English.lproj/InfoPlist.strings
    export INLINE_PRIVATE_FRAMEWORKS=NO
    export INSTALLHDRS_COPY_PHASE=NO
    export INSTALLHDRS_SCRIPT_PHASE=NO
    export INSTALL_DIR=/tmp/AwesomeProject.dst/Applications
    export INSTALL_GROUP=staff
    export INSTALL_MODE_FLAG=u+w,go-w,a+rX
    export INSTALL_OWNER=crifan
    export INSTALL_PATH=/Applications
    export INSTALL_ROOT=/tmp/AwesomeProject.dst
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export JAVAC_DEFAULT_FLAGS="-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"
    export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
    export JAVA_ARCHIVE_CLASSES=YES
    export JAVA_ARCHIVE_TYPE=JAR
    export JAVA_COMPILER=/usr/bin/javac
    export JAVA_FOLDER_PATH=AwesomeProject.app/Java
    export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
    export JAVA_JAR_FLAGS=cv
    export JAVA_SOURCE_SUBDIR=.
    export JAVA_USE_DEPENDENCIES=YES
    export JAVA_ZIP_FLAGS=-urg
    export JIKES_DEFAULT_FLAGS="+E +OLDCSO"
    export KEEP_PRIVATE_EXTERNS=NO
    export LD_DEPENDENCY_INFO_FILE=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Objects-normal/x86_64/AwesomeProject_dependency_info.dat
    export LD_GENERATE_MAP_FILE=NO
    export LD_MAP_FILE_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/AwesomeProject-LinkMap-normal-x86_64.txt
    export LD_NO_PIE=NO
    export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
    export LD_RUNPATH_SEARCH_PATHS=" @executable_path/Frameworks"
    export LEGACY_DEVELOPER_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
    export LEX=lex
    export LIBRARY_FLAG_NOSPACE=YES
    export LIBRARY_FLAG_PREFIX=-l
    export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
    export LIBRARY_SEARCH_PATHS="/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator "
    export LINKER_DISPLAYS_MANGLED_NAMES=NO
    export LINK_FILE_LIST_normal_x86_64=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Objects-normal/x86_64/AwesomeProject.LinkFileList
    export LINK_WITH_STANDARD_LIBRARIES=YES
    export LOCALIZABLE_CONTENT_DIR=
    export LOCALIZED_RESOURCES_FOLDER_PATH=AwesomeProject.app/English.lproj
    export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
    export LOCAL_APPS_DIR=/Applications
    export LOCAL_DEVELOPER_DIR=/Library/Developer
    export LOCAL_LIBRARY_DIR=/Library
    export LOCROOT=
    export LOCSYMROOT=
    export MACH_O_TYPE=mh_execute
    export MAC_OS_X_PRODUCT_BUILD_VERSION=16D32
    export MAC_OS_X_VERSION_ACTUAL=101203
    export MAC_OS_X_VERSION_MAJOR=101200
    export MAC_OS_X_VERSION_MINOR=1203
    export METAL_LIBRARY_FILE_BASE=default
    export METAL_LIBRARY_OUTPUT_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/AwesomeProject.app
    export MODULE_CACHE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/ModuleCache
    export MTL_ENABLE_DEBUG_INFO=YES
    export NATIVE_ARCH=i386
    export NATIVE_ARCH_32_BIT=i386
    export NATIVE_ARCH_64_BIT=x86_64
    export NATIVE_ARCH_ACTUAL=x86_64
    export NO_COMMON=YES
    export OBJC_ABI_VERSION=2
    export OBJECT_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Objects
    export OBJECT_FILE_DIR_normal=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/Objects-normal
    export OBJROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates
    export ONLY_ACTIVE_ARCH=YES
    export OS=MACOS
    export OSAC=/usr/bin/osacompile
    export OTHER_LDFLAGS=" -ObjC -lc++"
    export PACKAGE_TYPE=com.apple.package-type.wrapper.application
    export PASCAL_STRINGS=YES
    export PATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Develop
er/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms"
    export PBDEVELOPMENTPLIST_PATH=AwesomeProject.app/pbdevelopment.plist
    export PFE_FILE_C_DIALECTS=objective-c
    export PKGINFO_FILE_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/PkgInfo
    export PKGINFO_PATH=AwesomeProject.app/PkgInfo
    export PLATFORM_DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications
    export PLATFORM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
    export PLATFORM_DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library
    export PLATFORM_DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs
    export PLATFORM_DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Tools
    export PLATFORM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr
    export PLATFORM_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
    export PLATFORM_DISPLAY_NAME="iOS Simulator"
    export PLATFORM_NAME=iphonesimulator
    export PLATFORM_PREFERRED_ARCH=x86_64
    export PLATFORM_VERSION_AVAILABILITY_H_FORMAT=100000
    export PLIST_FILE_OUTPUT_FORMAT=binary
    export PLUGINS_FOLDER_PATH=AwesomeProject.app/PlugIns
    export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
    export PRECOMP_DESTINATION_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/PrefixHeaders
    export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
    export PRIVATE_HEADERS_FOLDER_PATH=AwesomeProject.app/PrivateHeaders
    export PRODUCT_MODULE_NAME=AwesomeProject
    export PRODUCT_NAME=AwesomeProject
    export PRODUCT_SETTINGS_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/AwesomeProject/Info.plist
    export PRODUCT_TYPE=com.apple.product-type.application
    export PROFILING_CODE=NO
    export PROJECT=AwesomeProject
    export PROJECT_DERIVED_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/DerivedSources
    export PROJECT_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios
    export PROJECT_FILE_PATH=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/AwesomeProject.xcodeproj
    export PROJECT_NAME=AwesomeProject
    export PROJECT_TEMP_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build
    export PROJECT_TEMP_ROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates
    export PUBLIC_HEADERS_FOLDER_PATH=AwesomeProject.app/Headers
    export RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS=YES
    export REMOVE_CVS_FROM_RESOURCES=YES
    export REMOVE_GIT_FROM_RESOURCES=YES
    export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
    export REMOVE_HG_FROM_RESOURCES=YES
    export REMOVE_SVN_FROM_RESOURCES=YES
    export REZ_COLLECTOR_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/ResourceManagerResources
    export REZ_OBJECTS_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build/ResourceManagerResources/Objects
    export REZ_SEARCH_PATHS="/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator "
    export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
    export SCRIPTS_FOLDER_PATH=AwesomeProject.app/Scripts
    export SCRIPT_INPUT_FILE_COUNT=0
    export SCRIPT_OUTPUT_FILE_COUNT=0
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
    export SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
    export SDK_DIR_iphonesimulator10_0=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
    export SDK_NAME=iphonesimulator10.0
    export SDK_NAMES=iphonesimulator10.0
    export SDK_PRODUCT_BUILD_VERSION=14A345
    export SDK_VERSION=10.0
    export SDK_VERSION_ACTUAL=100000
    export SDK_VERSION_MAJOR=100000
    export SDK_VERSION_MINOR=000
    export SED=/usr/bin/sed
    export SEPARATE_STRIP=NO
    export SEPARATE_SYMBOL_EDIT=NO
    export SET_DIR_MODE_OWNER_GROUP=YES
    export SET_FILE_MODE_OWNER_GROUP=NO
    export SHALLOW_BUNDLE=YES
    export SHARED_DERIVED_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator/DerivedSources
    export SHARED_FRAMEWORKS_FOLDER_PATH=AwesomeProject.app/SharedFrameworks
    export SHARED_PRECOMPS_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/PrecompiledHeaders
    export SHARED_SUPPORT_FOLDER_PATH=AwesomeProject.app/SharedSupport
    export SKIP_INSTALL=NO
    export SOURCE_ROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios
    export SRCROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios
    export STRINGS_FILE_OUTPUT_ENCODING=binary
    export STRIP_BITCODE_FROM_COPIED_FILES=NO
    export STRIP_INSTALLED_PRODUCT=YES
    export STRIP_STYLE=all
    export SUPPORTED_DEVICE_FAMILIES=1,2
    export SUPPORTED_PLATFORMS="iphonesimulator iphoneos"
    export SUPPORTS_TEXT_BASED_API=NO
    export SWIFT_PLATFORM_TARGET_PREFIX=ios
    export SYMROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products
    export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
    export SYSTEM_APPS_DIR=/Applications
    export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
    export SYSTEM_DEMOS_DIR=/Applications/Extras
    export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"
    export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"
    export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"
    ex
port SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"
    export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"
    export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"
    export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools
    export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
    export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
    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/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Products/Debug-iphonesimulator
    export TARGET_DEVICE_MODEL=iPhone9,1
    export TARGET_DEVICE_OS_VERSION=10.0
    export TARGET_NAME=AwesomeProject
    export TARGET_TEMP_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build
    export TEMP_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build
    export TEMP_FILES_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build
    export TEMP_FILE_DIR=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/AwesomeProject/ios/build/Build/Intermediates/AwesomeProject.build/Debug-iphonesimulator/AwesomeProject.build
    export TEMP_ROOT=/Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/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=501
    export UNLOCALIZED_RESOURCES_FOLDER_PATH=AwesomeProject.app
    export UNSTRIPPED_PRODUCT=NO
    export USER=crifan
    export USER_APPS_DIR=/Users/crifan/Applications
    export USER_LIBRARY_DIR=/Users/crifan/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 VERSIONING_SYSTEM=apple-generic
    export VERSIONPLIST_PATH=AwesomeProject.app/version.plist
    export VERSION_INFO_BUILDER=crifan
    export VERSION_INFO_FILE=AwesomeProject_vers.c
    export VERSION_INFO_STRING="\"@(#)PROGRAM:AwesomeProject  PROJECT:AwesomeProject-1\""
    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=8A218a
    export XCODE_VERSION_ACTUAL=0800
    export XCODE_VERSION_MAJOR=0800
    export XCODE_VERSION_MINOR=0800
    export XPCSERVICES_FOLDER_PATH=AwesomeProject.app/XPCServices
    export YACC=yacc
    export arch=x86_64
    export variant=normal
    /bin/sh -c /Users/crifan/dev/dev_root/daryun/KeYouTong/2.0/sourcecode/react_native/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
Launching org.reactjs.native.example.AwesomeProject
org.reactjs.native.example.AwesomeProject: 49671

然后就可以了:

-》

感觉是:

react-native run-ios

会去重新编译,链接,打包,安装app到模拟器中

-》才可以正常运行

-》那意味着之前的中间的某个环境,被破坏了,导致无法运行。

【总结】

当运行React Native的iOS的app出现:

No bundle URL present

时,去:

在iOS 模拟器已运行的情况下,在项目根目录的命令行中执行:

npm install
react-native run-ios

就可以了。

转载请注明:在路上 » 【已解决】ReactNative iOS运行出错:No bundle URL present

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (3)

  1. 很有帮助 感谢
    yy4410高清影院7年前 (2017-07-26)回复
  2. 没用
    淡雅7年前 (2017-07-06)回复
  3. 很有帮助 感谢
    RyanZ8年前 (2017-06-06)回复
92 queries in 0.188 seconds, using 22.23MB memory