iosxcodeios-simulatorxctest

Get EXC_CRASH (SIGKILL (Code Signature Invalid)) when try to test on simulator


I'm trying to run unit XCTest on the simulator and I'm getting a signature error. At the same time, the tests on your iPhone device are running correctly.

I use the Personal Team for the signature.

In addition, if you manually launch the TestApp application after completing the test, it starts correctly.

TestApp is a simple helloworld application made from xcode templates. I use it as a host.

From the Xcode report: Exception Type: EXC_CRASH (SIGKILL (Code Signature Invalid)) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: CODESIGNING 2 Invalid Page


Solution

  • One of frameworks have invalid signatures.
    codesign --verify --verbose lib
    lib: invalid signature (code or signature have been modified)
    In architecture: arm64