我想在真实设备上预览我的 View ,但是当我单击按钮时 Xcode 失败:
单击“诊断”按钮显示以下错误:
UVIntegration.ConcreteHardwareDevice.(unknown context at $13f0b5314).(unknown context at $13f0b531c).InstallError.failedToInstall(Error Domain=com.apple.dtdevicekit Code=-402620394 "Unable to install "AppName"" UserInfo={NSLocalizedDescription=Unable to install "AppName", NSUnderlyingError=0x7fe0360a1c50 {Error Domain=com.apple.dtdevicekit Code=-402620394 "The executable was signed with invalid entitlements." UserInfo={NSLocalizedFailureReason=The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016)., com.apple.dtdevicekit.stacktrace=(
----------------------------------------
GenericHumanReadableError: unexpected error occurred
failedToInstall(Error Domain=com.apple.dtdevicekit Code=-402620394 "Unable to install "AppName"" UserInfo={NSLocalizedDescription=Unable to install "AppName", NSUnderlyingError=0x7fe0360a1c50 {Error Domain=com.apple.dtdevicekit Code=-402620394 "The executable was signed with invalid entitlements." UserInfo={NSLocalizedFailureReason=The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016)., com.apple.dtdevicekit.stacktrace=(
0 DTDeviceKitBase 0x00000001217c66e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x00000001217c6de9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000012180656a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x0000000106e95c12 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x0000000121806301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000012168ea25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x0000000106fc6e7a __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x0000000106fc8552 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff72809583 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff7280a50e _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff7280face _dispatch_lane_serial_drain + 597
11 libdispatch.dylib 0x00007fff72810452 _dispatch_lane_invoke + 363
12 libdispatch.dylib 0x00007fff72819a9e _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff72a6371b _pthread_wqthread + 290
14 libsystem_pthread.dylib 0x00007fff72a6357b start_wqthread + 15
), DVTRadarComponentKey=487927, NSLocalizedDescription=The executable was signed with invalid entitlements.}}})
以上表明我的配置设置是错误的,但是如果我单击“运行”按钮,则该应用程序已部署并在我的设备上运行得非常好。
我究竟做错了什么?
最佳答案
以下为我修复:
转到以下位置选择您的命令行工具:Preferences > location > commandLine tools [drop down] > select Xcode 11
它被选为上一个(即 Xcode 10)
关于ios - 设备上的 Xcode 11 实时预览失败,但应用程序运行正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59786634/