Xcode 12.5 "code signature version is no longer supported"

After upgrading to Xcode 12.5 and iOS 14.5, I can no longer debug my app on my local physical device.

I get the below error.

I searched and cannot find any answers.

How do I fixed this?

Details

Unable to install "MyApp"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620375
  • -

The code signature version is no longer supported.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620375
User Info: {
  DVTRadarComponentKey = 261622;
  MobileDeviceErrorCode = "(0xE8008029)";
  "com.apple.dtdevicekit.stacktrace" = (
0  DTDeviceKitBase           0x000000011edd83b8 DTDKCreateNSErrorFromAMDErrorCode + 220
1  DTDeviceKitBase           0x000000011ee16ae1 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2  DVTFoundation            0x0000000107881b7c DVTInvokeWithStrongOwnership + 71
3  DTDeviceKitBase           0x000000011ee16822 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4  IDEiOSSupportCore          0x000000011eccf999 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.294 + 3534
5  DVTFoundation            0x00000001079b4931 __DVT_CALLING_CLIENT_BLOCK__ + 7
6  DVTFoundation            0x00000001079b655b __DVTDispatchAsync_block_invoke + 1191
7  libdispatch.dylib          0x00007fff20508603 _dispatch_call_block_and_release + 12
8  libdispatch.dylib          0x00007fff205097e6 _dispatch_client_callout + 8
9  libdispatch.dylib          0x00007fff2050f5ca _dispatch_lane_serial_drain + 606
10 libdispatch.dylib          0x00007fff2051008d _dispatch_lane_invoke + 366
11 libdispatch.dylib          0x00007fff20519bed _dispatch_workloop_worker_thread + 811
12 libsystem_pthread.dylib       0x00007fff206b04c0 _pthread_wqthread + 314
13 libsystem_pthread.dylib       0x00007fff206af493 start_wqthread + 15
);
}
  • -


System Information

macOS Version 11.3 (Build 20E232)
Xcode 12.5 (18205) (Build 12E262)
Timestamp: 2021-04-29T22:41:18-04:00
Same problem.
I think its a bug from Xcode same One here, If somebody find Solution tag me :)
Did you try to unregister the device on Xcode and register again ?
try this way:
go to the TARGETS -> select[your project name] -> General -> Frameworks,Libraries,and EmbeddedContent -> set the framework with [Do Not Embed]
14
I had to **** DerivedData. I tried both of the before mentioned things so I don't know which one worked.
Hey after struggling with this for an hour or two, I found that in your apple developer account, under 'Certificates, Identifiers & Profiles' > profiles > provisioning profiles, I needed to add the device I was using to test on in there, it takes you through steps. At the end you download a file (file will be named whatever you choose), when downloaded, double click the file and....magic, it works. I've never had this issue until I moved up to Xcode 12.5. Hope it helps.

What’s the output of this command for your app, and any other bundles in your app (ie frameworks, app extensions, etc)?

Code Block
codesign -dv /path/to/MyApp.app


The output of codesign -dv /path/to/MyApp.app:

Code Block
Executable=/Users/narlei/Library/Developer/Xcode/DerivedData/MyApp-fbfpzfaxsmhnpldccmhdayxtxeuc/Build/Products/Debug-iphoneos/MyApp.app/MyApp
Identifier=br.com.brainweb.MyApp
Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20400 size=2983545 flags=0x0(none) hashes=93225+7 location=embedded
Signature size=4855
Signed Time=5 May 2021 13:52:46
Info.plist entries=54
TeamIdentifier=XXXXXXXXX
Sealed Resources version=2 rules=10 files=1230
Internal requirements count=1 size=188

Thank you this was my solution to the issue, this error comes out very often regardless of the Xcode version

try this way:
go to the TARGETS -> select[your project name] -> General -> Frameworks,Libraries,and EmbeddedContent -> set the framework with [Do Not Embed]
@narlei_moreira is there a framework in your app as well? What's returned for all the frameworks and app extensions in your app bundle?
try this way:
go to the TARGETS -> select[your project name] -> General -> Frameworks,Libraries,and EmbeddedContent -> set the framework with [Do Not Embed]
Posted 3 days ago by CopperGaga 

This worked for me! Thank you Copper Gaga
If your apps actually require this embedded content, then removing it may break your release build. Does the framework that's causing this issue have an old signature? You may just need to re-sign it, as explained here.
I had this issue and found the solution. It's not about Xcode 12.5, but running on a device with iOS 14.5+.

My project was embedding 2 static frameworks (see @idelfonso answer) and the issue was fixed when I changed them to [Do Not Embed].

However, the correct answer here is not to [Do Not Embed] every framework you have, as you actually need to embed dynamic frameworks, your app will crash upon launch otherwise.

Use 'file' command line to find out if the framework is dynamic or static. For example:

Code Block bash
file Frameworks/Flutter.framework/Flutter
Frameworks/Flutter.framework/Flutter: Mach-O universal binary with 3 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm_v7] [arm64]
Frameworks/Flutter.framework/Flutter (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Frameworks/Flutter.framework/Flutter (for architecture armv7): Mach-O dynamically linked shared library arm_v7
Frameworks/Flutter.framework/Flutter (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64


As you can see, in this example Flutter is dynamically linked and therefore needs to be embedded. If 'file' doesn't give any hint that a framework is dynamic, then it's static and should not be embedded.

Embedding static frameworks is wrong because their code is already merged into the final binary. For some reason it was "ok" to do that before iOS 14.5.

Hope this helps.
I think the problem is with the device. Can't run the app on my daily driver but runs fine on a second device.

We use 2 static library in our project. Once the libs were added via "Build Phases > Link Binary with Libraries", they are shown in the "General > Frameworks, Libraries and Embedded Content".

Unlike other frameworks, there is NO "Do Not Embed" option for these 2 static libs. So my guess is they are embedded into the final binary without code signing?

And the problem is only found on the iOS 14.5+ devices.

i trying to solve this problem over the month but was and am failing.

Given that, my advice is that you open a DTS tech support incident so that DTS’s iOS code signing specialist can help you one-on-one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Identifier=xxxxx

Format=bundle with generic

CodeDirectory v=20200 size=240 flags=0x0(none) hashes=1+3 location=embedded

Signature size=4896

Signed Time=Aug 10, 2021 at 2:13:55 PM

Info.plist entries=23

TeamIdentifier=Y44M6Qxxxxx

Sealed Resources version=2 rules=10 files=78

Internal requirements count=1 size=204

I had the same issue. We have a static library that we sign&embed. This library has some dependencies on some CocoaPods.

I was able to solve this issue by rearranging Build phases in my Apps Targets Build Phase settings.

Correct order was as follows:

  • Compile
  • Copy Bundle Resources
  • Copy Pods Resources
  • Embed Pods Frameworks
  • Link Binary With Libraries
  • Copy our Static Framework (embed & sign)

Hope it will help anyone...

Go to Target settings and add flag --generate-entitlement-der to OTHER_CODE_SIGN_FLAGS

I tried various things, last my issue was resolved when i click on trust on device -> general -> device management

Apple has changed the codesign signature to include DER encoded entitlements in addition to the plist encoded entitlements. This additional DER encoded entitlements section is required in iOS 15 and becomes the default behavior of codesign in the latest Xcode. To use codesign on an older machines with an older version of Xcode add the --generate-entitlement-der flag to your call to codesign. If signing through Xcode, you can add this flag to the OTHER_CODE_SIGN_FLAGS setting in the Build Settings tab.

from here: https://stackoverflow.com/a/68467307/7033956

If you are getting this error.. it is a bug! There is no solution to this other than rebuilding your project and removing all package dependencies which are not absolutely necessary! Do not waste your time and energy trying to solve this... it's an issue with one of your package dependencies and is out of your control. Good luck!

i am still facing this issue in xcode 13.2, applied all possible answers but no luck

Found a workaround and described it in this thread.

TL;DR Adding the following options to the codesign command will result in a v=20500:

-o runtime --runtime-version "16.4.0"

So the solution would be adding those options to the OTHER_CODE_SIGN_FLAGS in the Build Settings of your app target, e.g.:

-o runtime --runtime-version $DEPLOYMENT_TARGET

After this the app successfully installs on a device.

Xcode 12.5 "code signature version is no longer supported"
 
 
Q