dyld: Symbol not found: swift34swift50override_conformsToProtocol

I am getting following error from one of the pod frameworks while running the app (Build is a success).

dyld: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E.

Referenced from: X framework

Expected in: frameworks/DeviceKit.framework/DeviceKit

mac OS 10.15

Xcode 12.4

React native 0.63

cocoapods: 1.10.1

I have the same problem !!!!

look, i found this:

When the *** not found symbol appears, the following situations will generally occur

  1. You added library ***, but the supported CPU structure is not consistent with the mobile phone you are running. Right now, use lipo-info to see the supported CPU structure per library.
  2. The *** version used does not match what you need. The above is the solution.

I had the same error message, I recompiled the dependency in question to a XCFramework and it fixed the issue.

This issue happens for chained dependencies. Suppose you have App -> A.framework -> B.framework. If you change B's target OS version and rebuilt B, this error occures.

The solution is to rebuilt A as well.

Of course, if you don't have the source code of A, you will have to revert to the old version of B

from iOS developer @ authing

In my case, in Podfile I have code that replaces IPHONEOS_DEPLOYMENT_TARGET for all pod targets with 'some' min version. Originally I had a '13.0' version. When I changed '13.0' to '9.0', did pod update, clean the project, and build & run again, the error didn't appear again.

Below is a piece of that code I have now:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) < Gem::Version.new('9.0')
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
  end
end

Hope my answer will help somebody and save time.

I am working with a framework from a private vendor through CocoaPods. The framework is targeted as iOS 12 but one of its dependencies (SwiftDate) is actually targeted for iOS 13, which raised the following error in Xcode: Compiling for iOS 12.0, but module 'SwiftDate' has a minimum deployment target of iOS 13.0

To fix that I did what @ababykina suggested and applied iOS 13 to all pods in post_install

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
    end
  end
end

By doing so I got the crash mentioned in the original post:

dyld[30013]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
  Referenced from: [...]/TestSDK.app/Frameworks/TheVendor.framework/TheVendor
  Expected in:     [...]/TestSDK.app/Frameworks/Alamofire.framework/Alamofire

The error mentioned the issue at hand: Alamofire was missing in my case.

From what I understand when you force a IPHONEOS_DEPLOYMENT_TARGET to a higher value than actually supported you'll see no error, yet it will not be included in the app afterwards and causes this crash. And indeed the vendor's podspec mentioned Alamofire 5.5.0 which targets iOS 10, and not 13 or up.

To fix this I had to isolate the offending dependency in post_install and execute pod install

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'SwiftDate'
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      end
    end
  end
end

And now it runs properly.

Hope this helps.

@sebastienk The solution you gave above worked perfectly till Xcode 15.x, but on Xcode 16 it crashes with the same stack trace. Did you find out how to fix it for Xcode 16?

I got the same error on Xcode16, still the alamofire. Error: __ZN5swift39swift51override_conformsToSwiftProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEN7__swift9__runtime4llvm9StringRefEPFPKNS_35TargetProtocolConformanceDescriptorIS1_EES4_S8_SC_E Referenced from: <E1C1F7C9-955A-3A02-A498-C3D514919E5B> /private/var/containers/Bundle/Application/42380089-254A-44E8-9871-F32735658C9A/Mx.app/Frameworks/xxxx.framework/xxxx Expected in: <168E9987-FB09-3D71-9A17-E4CD11CDFBA2> /private/var/containers/Bundle/Application/42380089-254A-44E8-9871-F32735658C9A/Mx.app/Frameworks/Alamofire.framework/Alamofire

I got the same error on Xcode16

Are you also using CocoaPods?

Share and Enjoy

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

dyld: Symbol not found: swift34swift50override_conformsToProtocol
 
 
Q