Feel free to ignore the comments I left above. The case is an error with the extension app, and it is considered normal, not an error with the actual app.
I also encountered the following problem:
I've read all the documentation to fix the issue, but I can't confirm any idea why this is happening?
Case 1
I had an existing Apple Development signed app for distribution.
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
Command : security cms -D -i /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/embedded.provisionprofile
Command : security cms -D -i /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension/Contents/embedded.provisionprofile
However, in order to distribute the app, as mentioned above, you must sign with Developer ID Applications to avoid being blocked by the gatekeeper.
Therefore, I re-signed, and the result of code signing is as follows.
Command : codesign -s "Developer ID Application: My Team (Team_id)" --options=runtime --force /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
Command : codesign -s "Developer ID Application: My Team (Team_id)" --options=runtime --force /Users/MyUserID/Desktop/release/SystemExtensions.app
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
embedded.provisionprofile properties are the same as before sign.
And when I run the app, the following error occurs.
Also, the square red box is the log being taken by my app.
What could be causing this error? Was it my fault?
=======================================================================================
Case 2
As I saw in Case 1, the entitlement property before and after signing is different, so when re-signing, I put the --preserve-metadata=entitlements option to bring the entitlement property as it is.
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
Command : security cms -D -i /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/embedded.provisionprofile
Command : security cms -D -i /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension/Contents/embedded.provisionprofile
Command : codesign --preserve-metadata=entitlements --force --verbose -s "Developer ID Application: My Team (Team_id)" --options=runtime --force /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
Command : codesign --preserve-metadata=entitlements --force --verbose -s "Developer ID Application: My Team (Team_id)" --options=runtime --force /Users/MyUserID/Desktop/release/SystemExtensions.app
After that, if you check the information, you can see that everything is normal as shown below.
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app
Command : codesign -dvvv --entitlements - /Users/MyUserID/Desktop/release/SystemExtensions.app/Contents/Library/SystemExtensions/My.Domain.SystemExtensions.Extension.systemextension
embedded.provisionprofile properties are the same as before sign.
Then, when you run it, an error different from Case1 is displayed as shown below.