在模拟器上,它工作正常。
但是,我尝试将我的应用部署到我的iPhone设备上。 屏幕是空白的,没有任何内容,并且摇动设备没有显示任何开发人员菜单。
这是我的项目回购。
https://github.com/poc7667/reacti-native-album-sandbox
如果我通过XCODE启动模拟器而不是" react-native run-ios"。
通过运行" react-native log-ios"
,这是异常日志我猜运行" react-native ios"并在XCODE上运行应用程序。我需要在XCODE上做些什么改变?
Scanning 561 folders for symlinks in /Users/userA/workspace/AwesomeProject/node_modules (10ms)
NOTE: Most system logs have moved to a new logging system. See log(1) for more information.
Jul 16 11:10:19 userAs-iMac com.apple.CoreSimulator.SimDevice.801A3299-3234-4BD5-8EF5-E5FE52676C20.launchd_sim[19117] (com.apple.imfoundation.IMRemoteURLConnectionAgent) <Warning>: Unknown key for integer: _DirtyJetsamMemoryLimit
Jul 16 11:10:19 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1cf06180 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:10:19 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
Jul 16 11:10:19 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1cf12dc0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:10:19 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
Jul 16 11:10:19 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1cf01940 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:10:19 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
Jul 16 11:10:19 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1cd07510 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:10:19 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
Jul 16 11:14:13 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Pasteboard change listener callback port <NSMachPort: 0x7fb879e017c0> registered
Jul 16 11:14:25 userAs-iMac SpringBoard[19134] <Error>: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
Jul 16 11:14:25 userAs-iMac com.apple.CoreSimulator.SimDevice.801A3299-3234-4BD5-8EF5-E5FE52676C20.launchd_sim[19117] (UIKitApplication:com.birchwords.Albums[0x65b][19139][19215]) <Notice>: Service exited due to Killed: 9
Jul 16 11:14:25 userAs-iMac backboardd[19135] <Error>: [Common] Unable to get short BSD proc info for 19215: No such process
Jul 16 11:14:25 userAs-iMac backboardd[19135] <Error>: [Common] Unable to get proc info for 19215: Undefined error: 0
Jul 16 11:14:25 userAs-iMac assertiond[19139] <Warning>: Deleted job with label: UIKitApplication:com.birchwords.Albums[0x65b][19139]
Jul 16 11:14:25 userAs-iMac watchlistd[19204] <Warning>: Now playing app did change to '(null)' (playing: 0) from '(null)'
Jul 16 11:14:25 userAs-iMac watchlistd[19204] <Warning>: WLKPlaybackSummary - Parameter failed validation bundleID. It is nil
Jul 16 11:14:26 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Requesting installation of file:///Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator/Albums.app with options: {
CFBundleIdentifier = "com.birchwords.Albums";
PackageType = Developer;
SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
SimulatorUserPath = "/Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data";
}
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIClientConnection _doInstallationForURL:withOptions:completion:]: Install of "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator/Albums.app" type Developer (LSInstallType = (null)) requested by lsd (pid 19149)
Jul 16 11:14:26 userAs-iMac installd[19129] <Error>: 0x70000945b000 MDMCreateDeltaDirectory: calling MDMDirectoryDiff with:
state->old_bundle: /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Containers/Bundle/Application/90BE8119-DC54-484C-9FC2-CE518CE11818/Albums.app
state->new_bundle: /Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator/Albums.app
state->dst_bundle: /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Library/Caches/com.apple.mobile.installd.staging/temp.sd7YoJ/extracted/Payload//Albums.app, binaryDiff flag: FALSE
dst_ipa: /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Library/Caches/com.apple.mobile.installd.staging/temp.sd7YoJ/extracted
Jul 16 11:14:26 userAs-iMac installd[19129] <Error>: 0x700009355000 MDMDirectoryDiff_block_invoke: calling writeDictToFile with: /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Library/Caches/com.apple.mobile.installd.staging/temp.sd7YoJ/extracted/ManifestCache.plist
Jul 16 11:14:26 userAs-iMac installd[19129] <Error>: 0x700009355000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Library/Caches/com.apple.mobile.installd.staging/temp.sd7YoJ/extracted/ManifestCache.plist
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundlePatch ID=com.birchwords.Albums; Version=1, ShortVersion=1.0>
Jul 16 11:14:26 userAs-iMac diagnosticd[19146] <Notice>: unsupported XPC object: OS_xpc_dictionary
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIInstallableBundlePatch applyPatchWithError:]: Attempting patch update of com.birchwords.Albums from 1 (1.0) to 1 (1.0)
Jul 16 11:14:26 userAs-iMac syslogd[19119] <Error>: Disabling module com.apple.appinstallation writes to /var/mobile/Library/Logs/CrashReporter/DiagnosticLogs/AppInstallation/AppInstallation.log following 6 failures (Operation Failed)
Jul 16 11:14:26 userAs-iMac diagnosticd[19146] <Notice>: unsupported XPC object: OS_xpc_dictionary
--- last message repeated 1 time ---
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIInstallableBundle _refreshUUIDForContainer:withError:]: Data container for com.birchwords.Albums is now at /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Containers/Data/Application/CAE958BC-65A4-49AF-92AE-B86B929E0DDF
Jul 16 11:14:26 userAs-iMac diagnosticd[19146] <Notice>: unsupported XPC object: OS_xpc_dictionary
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIContainer makeContainerLiveReplacingContainer:reason:withError:]: Made container live for com.birchwords.Albums at /Users/userA/Library/Developer/CoreSimulator/Devices/801A3299-3234-4BD5-8EF5-E5FE52676C20/data/Containers/Bundle/Application/0709404E-5FE2-4236-97ED-5F6F0E42E07F
Jul 16 11:14:26 userAs-iMac installd[19129] <Notice>: 0x70000945b000 -[MIInstaller performInstallationWithError:]: Install Successful; Staging: 0.01s; Waiting: 0.00s; Preflight/Patch: 0.01s, Verifying: 0.00s; Overall: 0.05s
Jul 16 11:14:26 userAs-iMac diagnosticd[19146] <Notice>: unsupported XPC object: OS_xpc_dictionary
--- last message repeated 3 times ---
Jul 16 11:14:26 userAs-iMac videosubscriptionsd[19257] <Warning>: Entering main() for videosubscriptionsd.
Jul 16 11:14:26 userAs-iMac videosubscriptionsd[19257] <Warning>: Unable to find framework using path: /System/Library/Frameworks/VideoSubscriberAccount.framework
Jul 16 11:14:26 userAs-iMac com.apple.CoreSimulator.SimDevice.801A3299-3234-4BD5-8EF5-E5FE52676C20.launchd_sim[19117] (com.apple.videosubscriptionsd[19257]) <Warning>: Service exited with abnormal code: 1
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobilemail
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] throwing out icon because it isn't visible in the model : node=<SBApplicationIcon: 0x6100001ff700; nodeID: 'com.apple.camera'> com.apple.camera
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobiletimer
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.weather
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.stocks
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobilenotes
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.MobileStore
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.AppStore
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.iBooks
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.videos
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.Home
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.facetime
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.calculator
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.podcasts
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.compass
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.tips
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.VoiceMemos
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobileme.fmf1
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobileme.fmip1
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.mobilephone
Jul 16 11:14:26 userAs-iMac SpringBoard[19134] <Error>: [Common] could not find icon for representation -> com.apple.Music
Jul 16 11:14:26 userAs-iMac diagnosticd[19146] <Notice>: unsupported XPC object: OS_xpc_dictionary
--- last message repeated 1 time ---
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Requesting launch of com.birchwords.Albums with options: {
arguments = (
);
environment = {
"DYLD_FRAMEWORK_PATH" = "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator";
"DYLD_INSERT_LIBRARIES" = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib";
"DYLD_LIBRARY_PATH" = "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/introspection";
NSUnbufferedIO = YES;
"OS_ACTIVITY_DT_MODE" = YES;
"__XCODE_BUILT_PRODUCTS_DIR_PATHS" = "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator";
"__XPC_DYLD_FRAMEWORK_PATH" = "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator";
"__XPC_DYLD_LIBRARY_PATH" = "/Users/userA/Library/Developer/Xcode/DerivedData/AwesomeProject-cwtwnkpxsnneanfwgksykblfnhgi/Build/Products/Release-iphonesimulator";
};
stderr = "/dev/ttys005";
stdout = "/dev/ttys005";
"wait_for_debugger" = 1;
}
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Beginning launch sequence for bundle 'com.birchwords.Albums'
retryTimeout: 120.000000 (default write com.apple.CoreSimulatorBridge LaunchRetryTimeout <value>)
bootTimeout: 300.000000 (default write com.apple.CoreSimulatorBridge BootRetryTimeout <value>)
bootLeeway: 120.000000 (default write com.apple.CoreSimulatorBridge BootLeeway <value>)
Note: Use 'xcrun simctl spawn booted defaults write <domain> <key> <value>' to modify defaults in the booted Simulator device.
Simulator booted at: 2017-07-16 18:09:01 +0000
Current time: 2017-07-16 18:14:30 +0000
Within boot leeway: NO
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Launch attempt #0 for bundle 'com.birchwords.Albums', have been trying to launch for 0 seconds. Modern launch services = YES
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Got LSBundleProxy for 'com.birchwords.Albums', sequenceNumber 248, cacheGUID D6E87C4F-60D4-4ED5-A856-563DCC394E11
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Error>: [Common] [FBSSystemService][0xce12] Sending request to open "com.birchwords.Albums"
Jul 16 11:14:30 userAs-iMac assertiond[19139] <Warning>: Submitted job with label: UIKitApplication:com.birchwords.Albums[0xcc60][19139]
Jul 16 11:14:30 userAs-iMac SpringBoard[19134] <Warning>: [com.birchwords.Albums] Bootstrap complete with label: UIKitApplication:com.birchwords.Albums[0xcc60][19139]
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Error>: [Common] [FBSSystemService][0xce12] Request successful: <BSProcessHandle: 0x7fb879d0d0f0; Albums:19258; valid: YES>
Jul 16 11:14:30 userAs-iMac CoreSimulatorBridge[19140] <Warning>: Launch successful for 'com.birchwords.Albums'
Jul 16 11:14:30 userAs-iMac watchlistd[19204] <Warning>: Now playing app did change to '(null)' (playing: 0) from '(null)'
Jul 16 11:14:30 userAs-iMac watchlistd[19204] <Warning>: WLKPlaybackSummary - Parameter failed validation bundleID. It is nil
Jul 16 11:14:32 userAs-iMac Albums[19258] <Error>: assertion failed: 16F73 14E8301: libxpc.dylib + 64131 [624BAF4F-2E03-34F8-ACBA-970B04637786]: 0x7d
Jul 16 11:14:32 userAs-iMac Unknown[19258] <Error>:
Jul 16 11:15:01 userAs-iMac routined[19123] <Error>: CoreLocation: Error occurred while trying to retrieve motion state update: CMErrorDomain Code:104
Jul 16 11:15:26 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1cd02420 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:15:26 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
Jul 16 11:15:26 userAs-iMac com.apple.CallKit.CallDirectoryMaintenance[19224] <Error>: [Default] Unable to initialize CXCallDirectoryStore for reading and writing: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CallDirectory” in the folder “Library”." UserInfo={NSFilePath=/var/mobile/Library/CallDirectory, NSUnderlyingError=0x7faf1ce0a0d0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Jul 16 11:15:26 userAs-iMac callservicesd[19197] <Error>: [Default] Error synchronizing call directory extensions: Error Domain=com.apple.CallKit.error.calldirectorymanager Code=0 "(null)"
答案 0 :(得分:0)
检查终端输出,从运行react-native run-ios
后启动/弹出的单独窗口中查看。这有时会显示构建失败的输出,这些输出由于某种原因会阻止在模拟器上加载任何内容。
如果没有显示任何内容,请打开一个单独的标签,并在同一项目目录中运行react-native log-ios
以显示从Xcode控制台显示的内容。