[SWIFT] Temporary workaround for the problem of failing with "no code signature found." When starting the actual Xcode12

Event

After upgrading to XCode12, I was suffering from the problem that even if I could build and start the simulator, it would fail by spitting out the following code when starting the actual machine.

No code signature found.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620388
……

It occurs when the external library SwiftyTesseract is installed from SwiftPackageManager, and when I investigate it, it seems that the same phenomenon occurs in the Firebase library and so on.

Cause and solution

Apparently, even if the external library installed is static, it is transferred to the actual machine, and the signature of the binary is checked and it seems that it fails.

Reference URL

Basically it seems to be a bug of XCode 12, but it can be temporarily dealt with by adding the following Run Script to Edit SchemaBuildPost-actions as shown in the above reference URL.

__ Please note that the Frameworks to be removed should match the installed library __

# Type a script or drag a script file from your workspace to insert its path.
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/libtesseract.framework"
rm -rf "${TARGET_BUILD_DIR}/${TARGET_NAME}.app/Frameworks/SwiftyTesseract.framework"

For reference, as a temporary measure until XCode 12 is fixed.

Recommended Posts

Temporary workaround for the problem of failing with "no code signature found." When starting the actual Xcode12
Specify the character code of the source when building with Maven
[Code] Forcibly breaks through the C problem "* 3 or / 2" of [AtCoder Problem-ABC100] with Java [Code]