Binary Signing Error

I will post my app xyz.app uses XY swift package this swift package is a wrapper for XYSDK.xcframework XYSDK.xcframework written in c++ and app running on arm64 macos and iphones succesfully.

I got this error when i want to distribute it.

Currently i sign .framework for ios with Apple Distribution Certificate and same certificate for macos framework there is no other signing step for swift package or xcframework

other than that when i want to archive it validates succesfully. Exporting step shows that app has signed, has provisining profile. but .framework is only signed has no provisioning profile.

Also one point i see: i have one target named xyz and its Frameworks, Lİbraries and Embedded Context has only XY package but Embed part has no option like embed and sign etc. Blank.

I need more info about what am i doing wrong in which step ? I am stuck and can not move any further like weeks

Error Detail:

Invalid Signature. The binary with bundle identifier XYSDK at path “xyz.app/Frameworks/XYSDK.framework” contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing. (90035)

Just to be clear, frameworks don’t need a provisioning profile. The purpose of a profile is to authorise the execution of code. You can’t execute a framework directly — it’s always run as part of a process that was started from some executable — and thus there’s never a need for it to have a profile. Or entitlements for that matter.

We talk about this in gory detail in TN3125 Inside Code Signing: Provisioning Profiles.

As to what’s going wrong here, it’s hard to say without more details. Let’s start at the end and work backwards. My understanding is that you’re hitting this error when you attempt to submit (or validate) an App Store submission using the Xcode organiser. Is that right?

If so, is that for your iOS app?

If so, please run through the Distribute App > Custom > App Store > Export workflow. That should succeed and produce a .ipa. Unpack the .ipa file (it’s a zip archive under the covers) and then look at the built app. What do you get back from the following?

% codesign -d -vvv --entitlements - path/to/your.app/Frameworks/XYSDK.framework
% codesign -d -vvv --entitlements - path/to/xyz.app

Share and Enjoy

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

Binary Signing Error
 
 
Q