As noted on this thread already, you can resolve the error for The code signature version is no longer supported
, by re-signing your app. To check if you need to re-sign your app, use the codesign
utility to take a look at the version contained on your app's CodeDirectory
. Note that this will be output with something like:
| $ codesign -dvvvvv MyApp.app |
| Executable=/path/to/myapp/MyApp.app/Contents/MacOS/MyApp |
| Identifier=com.example.mycompany-samplecode.myapp |
| Format=app bundle with Mach-O universal (x86_64 arm64) |
| CodeDirectory v=20500 size=949 flags=0x10000(runtime) hashes=20+5 location=embedded |
And if you see a version with v=20500
on it then you should be good here. If you see a version less that 20400 here then you'll need to re-sign your app.
Another case could be that you previously re-signed your app and the CodeDirectory
is 20400 or higher, but the app does not install on iOS properly. If this is the case then you may need to re-sign your app including the DER entitlements. To check if you need to re-sign using the DER entitlements, run the following command to take a look at the hash values in the signature'sPage size
:
| codesign -dvvvvv MyApp.app |
| |
| ... |
| Page size=4096 |
| -7=4ade7be00e0a7b6db853edc4843e7ece1eea646f6f13d1809f78fc50d8db461f |
| -6=0000000000000000000000000000000000000000000000000000000000000000 |
| -5=1dfa58bd8ac3c4fb42142c1c4d28c436128b3a7460186a44526194fb690112bc |
| -4=0000000000000000000000000000000000000000000000000000000000000000 |
| -3=ef08dbe5a7c355336e1fb571604b683ce1c54536cb59a6155a1d18387fd23f6e |
| -2=5b730fa46ffd405fd88da9606d82eda9af7f460f6049047afc176163326f5a7f |
| |
If -5 contains a value and -7 has a zero value, or is not present at all, then you will need to re-sign your app with DER entitlement. One way to do this is to add this into your Xcode Build Settings by setting the --generate-entitlement-der
for OTHER_CODE_SIGN_FLAGS
. This can also be done on the command line by using the following command:
| # Re-sign your app |
| |
| % codesign -s "Signing Identity Name from Keychain" -f --preserve-metadata --generate-entitlement-der MyApp.app |
| ... |
| MyApp.app: replacing existing signature |
| |
| # Check your signature again |
| |
| % codesign -dvvvvv ActionExtensionHostSSO.app |
| ... |
| Page size=4096 |
| -7=4ade7be00e0a7b6db853edc4843e7ece1eea646f6f13d1809f78fc50d8db461f |
| -6=0000000000000000000000000000000000000000000000000000000000000000 |
| -5=1dfa58bd8ac3c4fb42142c1c4d28c436128b3a7460186a44526194fb690112bc |
| -4=0000000000000000000000000000000000000000000000000000000000000000 |
| -3=ef08dbe5a7c355336e1fb571604b683ce1c54536cb59a6155a1d18387fd23f6e |
| -2=5b730fa46ffd405fd88da9606d82eda9af7f460f6049047afc176163326f5a7f |
| ... |
| Signed Time=Jul 9, 2021 at 6:40:59 AM |
| |
Try the following steps below and if there are still issues installing or re-signing apps, please let me know.
| Matt Eaton |
| DTS Engineering, CoreOS |
| meaton3@apple.com |