After tweaking the codesign command --particularly replacing double quotes with single quotes and no quotes for the app address, I believe I got it to work:
codesign --force --options runtime --sign 'Developer ID Application: Antony Nispel (73ZUW8A5RN)' /Users/antonynispel/Desktop/SpellAnalysis\ 2022-04-22\ 09-44-49/SpellAnalysis.app
`replacing existing signature' was the report. Then I ran the test command you suggested above to view status of hardened runtime:
codesign -d -vvv /Users/antonynispel/Desktop/SpellAnalysis\ 2022-04-22\ 09-44-49/SpellAnalysis.app
gave me this report: 'CodeDirectory v=20500 size=4468 flags=0x10000(runtime)'
I take this to be a sign of success, right? Now I should get on with the packaging and its notarization. I am indebted to your continued assistance, without which I would never have succeeded.
Thank you.
I went ahead and code signed my app just as you instructed. Then applied the "find" command. This seems to show that there is only one executable and that it is not code hardened:
Identifier=com.paidiaacademicsoftware.SpellAnalysis
Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20400 size=4588 flags=0x0(none)
If this is the case, somehow Xcode is not implementing the code hardening capability I assign it.
I went ahead and attempted to implement code hardening using Terminal:
codesign --force --options runtime --timestamp --sign "Developer ID Application:Antony Nispel (73ZUW8A5RN)" /Users/antonynispel/Desktop/SpellAnalysis\ 2022-04-22\ 09-44-49/SpellAnalysis.app
The response is:
Developer ID Application:Antony Nispel (73ZUW8A5RN): no identity found
or when I use just my name:
Developer ID Application:Antony Nispel: no identity found
Perhaps I am supplying the wrong ID or there is a problem with my ID?
What do you think? Thanks.
As far as I can tell, my app has no nested executables. I did find a couple of AppleScript files that are not essential to the app and so I removed them. This apparently wasn't the problem since I still get the same report about needing to provide a hardened runtime capability even after I cleaned the build folder. It would sure be nice if Apple's log would specify which parts of the app need to be runtime hardened.
I will keep looking. Thank you for your persistence.
OK. I stand corrected: I should select the Distribute App option and not the Validate option. This leads to the panel where I should select Developer ID. So part of my problem was selecting the wrong options.
Now I must choose from 4 radio buttons, and it seems I should choose the Developer ID option and not the App Store Connect radio button.
Now appears another panel where I should choose to Upload instead of Export. However upon doing this, I immediately receive the strange report: "Hardened Runtime is not enabled." In fact I have provided this capability along with Signing. I also made sure that Hardened runtime is enabled within my Build settings. I have tried very hard to remedy this issue with no luck.
Thanks for your help.
Yes, that seems right. Right before I select the "Validate" button, I see a panel that shows the following:
Team: Antony Nispel (Individual)
Certificate: Cloud Managed Apple Distribution (Expires 4/12/23)
Profile: Mac Team Store Provisioning Profile: com.paidiaacademicsoftware.SpellAnalysis (Expires 4/12/23)
Symbols: Included
Architectures: arm64
Version: 3.5 (3.0)
ENTITLEMENTS
com.apple.developer.team-identifier
73ZUW8A5RN
com.apple.application-identifier
73ZUW8A5RN.com.paidiaacademicsoftware.SpellAnalysis
So it looks like Apple recognizes my developer certificates and me as a team member despite what I wrote earlier on. However, upon receiving my validation report, it shows "App Store Connect Operation Error, asset validation failed" seven times. Keep in mind that I don't wish to distribute my app at the App Store, but using my own resources.
I watched a video on how to motorize an app from the command line which might provide a better feedback log upon failure of acceptance. I ran into trouble over the Apple ID input that I am currently trying to figure out.
Thank you for your continuing help--I have been at this for at least a week.
Thanks for reply. I am indeed attempting to distribute a Mac app and I am using Xcode to authorize it. I suspect that my development ID and Mac Developer certificates are not being read by Xcode.