[Xcode 10] Unable to Sign “invalid argument '???'”

I am submitting a macOS app to App Store Connect, but after successful upload of the archive with Xcode 10 I get an email soon after:


Dear Developer,

We identified one or more issues with a recent delivery for your app, "Canopy". Please correct the following issues, then upload again.

Unable to Sign - This package doesn't meet the current code signing requirements. For more information, see the Code Signing and Application Sandboxing Guide and Technical Note 2206.

Specifically, codesign generated the following error:

     invalid argument '???'
     invalid argument '???'


The App Store Connect status then becomes “Invalid Binary”.


I recently submitted an almost identical build (at the very least, no build settings were changed) with Xcode 9 and there was no problems. I want to submit with Xcode 10 since the app supports Dark Mode and I want my users to get this feature day one.


All Codesign settings in Xcode look normal (automatic, team set, signing identity set, etc.)


The app has a single framework which was built with Carthage.


I built the archive on High Sierra with Xcode 10 GM.


I am stumped, any help would be much appreciated.

Accepted Reply

Do you have Hardened Runtime enabled on your application target by any chance?


I had that turned on, but turned it off to see if it would solve the problem and I believe it did.


I did not get the email from Apple and I was able to attach my new build to my app in App Store Connect.


So maybe that was the solution.


I had no troubles with Hardened Runtime with the direct sale version of my app. I even notarized it.

Replies

I've just confirmed that this issue is now solved. Thank you for addressing it, although it is a bit too late.

This is now longer necessary after late September (see thread below). The problem has been fixed and apps with the hardened runtime enabled (codesign --options runtime) can be uploaded to the Mac App Store.