昨天更新打包 app 产品说微信登陆 IOS 用不了了,于是只能用真机调试了,但是他喵一直卡在 Unable to install "xxxxx"

踩坑 IOS 真机调试报错 The executable was signed with invalid entitlements-天真的小窝

问了公司大佬说是 entitlements 问题。

点击 Details 看到 The executable was signed with invalid entitlements. 错误

踩坑 IOS 真机调试报错 The executable was signed with invalid entitlements-天真的小窝
Details

Unable to install "xxxxxx"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620394
--
The executable was signed with invalid entitlements.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620394
User Info: {
    DVTRadarComponentKey = 000000;
    MobileDeviceErrorCode = "(0xE8008016)";
    "com.apple.dtdevicekit.stacktrace" = (
	0   DTDeviceKitBase                     0x0000000125cb481a DTDKCreateNSErrorFromAMDErrorCode + 233
	1   DTDeviceKitBase                     0x0000000125cf5f70 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
	2   DVTFoundation                       0x000000010c172f35 DVTInvokeWithStrongOwnership + 73
	3   DTDeviceKitBase                     0x0000000125cf5ca8 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1654
	4   IDEiOSSupportCore                   0x0000000125b6ce91 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4165
	5   DVTFoundation                       0x000000010c2a65d4 __DVT_CALLING_CLIENT_BLOCK__ + 7
	6   DVTFoundation                       0x000000010c2a8216 __DVTDispatchAsync_block_invoke + 1194
	7   libdispatch.dylib                   0x00007fff67caa6c4 _dispatch_call_block_and_release + 12
	8   libdispatch.dylib                   0x00007fff67cab658 _dispatch_client_callout + 8
	9   libdispatch.dylib                   0x00007fff67cb0c44 _dispatch_lane_serial_drain + 597
	10  libdispatch.dylib                   0x00007fff67cb15d6 _dispatch_lane_invoke + 363
	11  libdispatch.dylib                   0x00007fff67cbac09 _dispatch_workloop_worker_thread + 596
	12  libsystem_pthread.dylib             0x00007fff67f05a3d _pthread_wqthread + 290
	13  libsystem_pthread.dylib             0x00007fff67f04b77 start_wqthread + 15
);
}
--


System Information

macOS Version 10.15.6 (Build 19G73)
Xcode 11.6 (16141)

其实之前真机调试就一直这样,所以我一直用的模拟器调了,但是调微信不得不使用测试机了,于是我一顿 Google 发现有人说是项目签名团队和项目Test 签名不同

原回答链接:Entitlements file do not match those specified in your provisioning profile.(0xE8008016)

于是我看了一下我项目的配置,发现还真的不一样,调成同一个团队签名重新 Run 终于好了。

踩坑 IOS 真机调试报错 The executable was signed with invalid entitlements-天真的小窝

IOS 这个签名我是真的被搞迷了,而且我们公司还有多个账号很多APP又是在不同账号上,还有签名创建啥的。害(反正我没太搞明白这套 IOS 签名流程… Android 多简单一个密钥文件搞定,IOS 搞这么复杂真的是)