gomobile bind
.The signature of the binary is invalid
unsealed contents present in the root directory of an embedded framework
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
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