xcodemacoscodesigngomobile

Xcode 15.3 Archive and Direct Distribution of App fails during notarization: The signature of the binary is invalid / unsealed contents in root dir


Core Issue: how does a code signed XCFramework added to a macOS app that is also code signed and ready for distribution, produce the error: The signature of the binary is invalid


Solution

  • Problem: The Framework directory had an extraneous Info.plist file included in its directory. Apple Docs mention:

    The framework’s root must contain only the Versions directory and symlinks. Don’t place any other content there. Doing so causes code-signing problems.

    Solution: remove the Info.plist in the macOS Framework root (this is not the same as the Info.plist that resides in the XCFramework root; keep that one). Once removed, Xcode codesign no longer throws an error.

    Conclusion: Follow Apple's instructions regarding XCFramework generation.

    Context of my workflow here, just in case anyone is curious