Signed XCFramework from SPM

Hi,

I’m trying to add the expected signature to an XCFramework that is an SPM dependency. I can see that it’s possible to add the expected signature for a local XCFramework dependency here but the expectedSignatureparameter doesn’t exist for an external dependency.

I can see from the pbxproj that it’s stored like this:

77C479C930030662A4AF2CDF /* Foo.xcframework */ = {isa = PBXFileReference; expectedSignature = "AppleDeveloperProgram:TEAMID:NAME"; lastKnownFileType = wrapper.xcframework; path = Foo.xcframework; sourceTree = "<group>"; };

Then in Xcode if the project is built and the code signature has changed it will fail the build. Without storing this in git then if the signing on the framework is removed or changed the build won’t fail.

Is there a way to do this in Tuist?

Thanks,
Jonathan

Hey @Jon889 :waving_hand:

Would like to get your thoughts on this solution and the API that I propose for it.

Thanks for the quick turnaround!
The API makes sense to me :slight_smile:

I tried out the branch locally and while there was a small compilation issue (with the ProjectDescription.XCFrameworkSignatue.fromfunction being fileprivate and being used from PackageInfoMapper)It worked well, validating the SDK on generation and also inside Xcode, both for valid and invalid signatures.

1 Like

Thank you @Jon889. I’ll then push it to the finish line. Once we have it merged, it’ll be released automatically.

Thanks for your work on this, I’ve implemented the changes and it’s working well!

1 Like