sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Why hasn't the latest version of the XCFramework been signed?

Open XKCheng opened this issue 1 year ago • 8 comments

Problem Statement

According to the guidelines for verifying the origin of your XCFrameworks, it is expected that XCFrameworks should be signed. However, in examining the 8.21.0 asset version, I could not locate any associated signature.

Solution Brainstorm

No response

Are you willing to submit a PR?

No response

XKCheng avatar Mar 14 '24 06:03 XKCheng

Hello @XKCheng thanks for reaching out.

We have never signed any of our versions of the XCFramework. Our primary distribution methods are CocoaPods or SPM, and until now, none of these have had a pre-built framework.

The next version of SPM will have pre-built framework. @philipphofmann I believe we should discuss about adopting framework signing.

brustolin avatar Mar 14 '24 12:03 brustolin

Related Apple docs: https://developer.apple.com/documentation/xcode/creating-a-multi-platform-binary-framework-bundle#Sign-the-XCFramework-bundle.

philipphofmann avatar Mar 14 '24 13:03 philipphofmann

I suspect this issue is the reason we can't update to Xcode 16 8.21.0 works fine on Xcode 15.4 On Xcode 16 it shows some errors, so I try to update it to 8.36.0 Build succeeds but installation of our system extension now fails with error: Domain=OSSystemExtensionErrorDomain Code=8 "Invalid code signature or missing entitlements"

iwan-ua avatar Sep 01 '24 12:09 iwan-ua

Hello @iwan-ua, this error is only for the system extension? The main app is fine?

brustolin avatar Sep 02 '24 06:09 brustolin

Hello @iwan-ua, this error is only for the system extension? The main app is fine?

Yes. The app runs when launched from Xcode. To run the system extension, you must first install it. We do it like this from the main app: let request = OSSystemExtensionRequest.activationRequest(forExtensionWithIdentifier: sysextBundleID, queue: DispatchQueue.global()) OSSystemExtensionManager.shared.submitRequest(request) With updated sentry, this request instantly fails with Domain=OSSystemExtensionErrorDomain Code=8 "Invalid code signature or missing entitlements"

iwan-ua avatar Sep 02 '24 06:09 iwan-ua

I have a workaround now. I deleted Sentry from SPM, and added manually downloaded latest Sentry.xcframework as "Do not embed". No problems with system extension now. I'm hoping to switch back to SPM when this issue is resolved.

iwan-ua avatar Sep 11 '24 18:09 iwan-ua

Thanks for the input @iwan-ua. We will look into finding a solution for the SPM

brustolin avatar Sep 12 '24 06:09 brustolin

@brustolin thanks for your response, it's quite blocking thing once we upgrade to Sequoia and Xcode 16 (because older Xcode doesn't run in newer macOS)

antonshkurenko avatar Sep 12 '24 13:09 antonshkurenko