[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

If I export the archive with the “Developer ID” option and then run codesign verify it is good:


$ codesign --verify --deep --strict --verbose=2 Canopy.app/
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreImage.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreImage.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftObjectiveC.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftObjectiveC.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftAppKit.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftAppKit.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftXPC.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftXPC.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreGraphics.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreGraphics.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftMetal.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftMetal.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreData.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreData.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftDispatch.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftDispatch.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreFoundation.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCoreFoundation.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftDarwin.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftDarwin.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftos.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftos.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftQuartzCore.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftQuartzCore.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/PromiseKit.framework/Versions/Current/.
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/PromiseKit.framework/Versions/Current/.
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCore.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftCore.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftIOKit.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftIOKit.dylib
--prepared:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftFoundation.dylib
--validated:/Users/mxcl/Desktop/Canopy-macOS 2018-09-14 11-26-40/Canopy.app/Contents/Frameworks/libswiftFoundation.dylib
Canopy.app/: valid on disk
Canopy.app/: satisfies its Designated Requirement

I'm having this exact same problem. I was able to successfully upload the iOS version of my app. And also I was able to notarize the direct download version of my Mac app. But uploading for Mac App Store distribution gives the same error as you received.


I wonder if it's a problem on iTunes Connect? Also, I generated a new certificate and that didn't seem to make any difference.


Would love to know how to resolve this problem.

Have you found a solution to this problem yet?


I tried deleting all my certificates and provisioning profiles, from App Store Connect and from my Keychain and disk. Still no joy in submitting my app update.

Having the same issue 😟

I submitted a request to the support people at App Store Connect. They asked me for more information and screenshots. Hopefully they can help to figure out what the problem is.


Maybe if everyone here contacted them directly they would look more closely into it. Because right now the only way I can get my app update out is to provide it to my direct download customers only.

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.

Disabling hardened runtime did the trick. A shame since now I have to remember to enable it if I want to distribute app-store independent builds. Oh well. Thanks so much for figuring this out!

You can have 2 targets. One with Hardened Runtime enabled and one without. That's what I do for the MAS and direct sale versions of my app.

You should be able to submit an app with the hardened runtime enabled to the Mac App Store.


You've found a workaround but it shouldn't be necessary. Can you please file a bug report at <https://developer.apple.com/bug-reporting> and post the bug number here?


Thanks,

--gc

Since I am facing the same issue, I have just reported my issue with the Bug Reporter.

The bug number of mine is 44639748.

I submitted a bug report a couple of days ago


rdar://44617253

any word on this? we're still seeing this happening.


rdar://problem/44663623

I was contacted today by the bug reporting team and they said they fixed it on their side. So it should work now.

But it didn't for me when I just tested it a few moments ago. I still received the "invalid arguments ???" email.

As of this post, the issue reported here should now be resolved. Please try submitting your app again.