The following error occurs:
IPhone developer: this identity cannot be used for signing code
Command/bin/sh failed with exit code 1
The specific cause is not clear, and the root cause is not found.
However, you can solve the problem by using the following script:
Export
Codesign_allocate =/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/usr/bin/codesign_allocate
If ["$ {platform_name}" = "iphoneos"] | ["$ {platform_name}" = "ipados"]; then
/Applications/xcode. APP/contents/developer/iphoneentitlements/gen_entitlements.py "My. company. $ {project_name} "" $ {built_products_dir}/$ {wrapper_name}/$ {project_name }. xcent ";
Codesign-F-s "iPhone developer" -- entitlements "$ {built_products_dir}/$ {wrapper_name}/$ {project_name }. xcent "" $ {built_products_dir}/$ {wrapper_name }/"
Fi
It's also a little depressing ....
Finally, we found a solution to the problem. The problem was caused by a certificate creation error when the certificate was created.
When using the certificate assistant to create a certificate, select "code signature" as the certificate type.
After modification, You can debug the real machine without the problem of second return.
I had to wait a long time for the problem of second return ..... Nnd .....