<article class="_2rhmJa">
解决方法:在TARGETS-Build Settings-Excluded Architectures中添加以下代码
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64= arm64 arm64e armv7 armv7s armv6 armv8 EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
image
以上操作会导致项目不能真机运行:Unable to install "App Name"
imageDetails
Unable to install "App Name"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
--
An unknown error has occurred.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620415
User Info: {
DVTRadarComponentKey = 280331;
MobileDeviceErrorCode = "(0xE8008001)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000120f2d99f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x0000000120f6c164 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x0000000102f63993 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x0000000120f6bea5 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x0000000120ddc7bc __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x00000001030922ae __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x0000000103093ed0 __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff201775dd _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff201787c7 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff2017e5fe _dispatch_lane_serial_drain + 606
10 libdispatch.dylib 0x00007fff2017f0cb _dispatch_lane_invoke + 375
11 libdispatch.dylib 0x00007fff20188c5d _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib 0x00007fff20320499 _pthread_wqthread + 314
13 libsystem_pthread.dylib 0x00007fff2031f467 start_wqthread + 15
);
}
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.2 (17535) (Build 12B45b)
Timestamp: 2020-12-10T10:08:10+08:00
解决方法,删除上面配置信息,但是这样子会导致还是不能虚拟机运行。
最终的解决方法:
image只输入arm64就能完美解决。
之后又发现在低版本的Xcode中,因为有arm64,所有会报错:The file "App Name" couldn't be opened because you don't have permission to view it.
解决办法:删除Valid Architectures中的arm64
实际上出现这个问题本身就很奇怪,就是高低版本Xcode之间的问题。
有人会问,为什么你中间多写这么多废话,在这里我记录过程,就是为了更好的帮助理解以及帮助那些遇到中间过程错误的码友。
</article>
网友评论