Code Signing an app including a binary Metallib

Hi! I am currently trying to upload my iOS app to App Store Connect. Unfortunately, code signing fails with the following error: "Code object is not signed at all.", referencing a binary Metallib (created with metal-tt and an mtlp-json script). I am using Xcode's automatically managed signing and the binary metallib is located inside the "Resources" directory of a framework that I am including with "Embed and sign" in the app. Could anyone give some guidance on what I need to change to make code signing work? Thank you.

Accepted Reply

Update: Solved by including the binary Metallib in the "Resources" directory of the app instead of the framework.

Replies

Update: Solved by including the binary Metallib in the "Resources" directory of the app instead of the framework.

Solved by including the binary Metallib in the "Resources" directory of the app instead of the framework.

Correct.

I talked with one of my colleagues who supports Metal and, yeah, from the perspective of code signing, a .metallib file can’t carry its own code signature and thus is signed as data. Placing Content in a Bundle says:

Code content is either executable code, like a helper tool, or another bundle that contains executable code, like an app extension. In this context, executable code means a Mach-O image. It doesn’t include things like shell scripts, Python scripts, and AppleScripts

You’d treat a .metallib file just like one of these scripts.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"