本文图文讲解用Xcode打包iOS项目时报Unable to install xxx而无法将app安装到iPhone。
app项目加新功能添加了一些依赖库后打包的时候报Unable to install xxx而无法将app安装到iPhone,具体信息如下图:
Details:
Details
Unable to install "fenxianglu"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
--
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
DVTRadarComponentKey = 282703;
MobileDeviceErrorCode = "(0xE8000051)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000012a67199f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x000000012a6b0164 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010d579993 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x000000012a6afea5 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x000000012a5207bc __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x000000010d6a82ae __DVT_CALLING_CLIENT_BLOCK__ + 7
6 DVTFoundation 0x000000010d6a9ed0 __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff201745dd _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff201757c7 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff2017b5fe _dispatch_lane_serial_drain + 606
10 libdispatch.dylib 0x00007fff2017c0cb _dispatch_lane_invoke + 375
11 libdispatch.dylib 0x00007fff20185c5d _dispatch_workloop_worker_thread + 819
12 libsystem_pthread.dylib 0x00007fff2031d499 _pthread_wqthread + 314
13 libsystem_pthread.dylib 0x00007fff2031c467 start_wqthread + 15
);
}
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.2 (17535) (Build 12B45b)
Timestamp: 2020-12-06T16:59:42+08:00
网上有说添加的组件库中缺少plist文件、bundle ID重复的、证书问题、Xcode缓存问题等等,但排查后都没解决问题,包括删了Xcode缓存~/Library/Developer/Xcode/DerivedData目录下的文件后重新打包还是不行。
后面发现我在添加依赖库后把Embed改成了“Embed & Sign”或者“Embed Without Signing”:
实际上只需要把它改回“Do Not Embed”即可解决问题,如果非要Embed,那就在Build Phases -> Embedded Frameworks ->勾选 “Copy only when installing”:
另外遇到这种问题要根据具体的提示信息来排查问题,我这里是报“Could not inspect the application package.”,其他可能是“The maximum number of apps for free development profiles has been reached”或者“The certificate used to sign “XXX” has either expired or has been revoked. An updated certificate is required to sign and install the application.”等等,具体问题具体分析。
历史上的今天:
展开阅读全文
上一篇: 渣男壁纸–妹子勿进!-20201206
下一篇:SpringBoot快速入门教程
I really like it when folks come together and share views. Great site, stick with it. Lishe Curr Morrell
Di karnakan permainan Judi Indonesia Paling Gampang. Alli Reuben Kuhlman
Heya i am for the first time here. I came across this board and I to find It truly useful & it helped me out much. Lenora Dionysus Del
For latest news you have to visit world-wide-web and on internet I found this web page as a best site for most up-to-date updates. Korry Calvin Norry
I have read so many articles concerning the blogger lovers but this piece of writing is actually a good post, keep it up. Stevena Dallas Ivana
Thanks for all sharing
Good article with great ideas! Thank you for this important article. Thank you very much for this wonderful information.
thanks for good sharing