iOS cocoapods giving dyld: Symbol not found: when the application is launched

Viewed 28

I have a third party XCFramework that needs to be integrated in project.

This library has the dependencies for Alamofire and my application is also using Alamofire as a pod file. When I am launching the application its crashing with below error.

Xcode version - 13

Pods version - 1.11.3

dyld[56651]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E

Referenced from: <2CFE95B3-EC89-3459-8184-A4862E6E69E1> /Users/Library/Developer/CoreSimulator/Devices/0DB97CE5-10D4-4A9F-ACD0-1F40BF41BD9E/data/Containers/Bundle/Application/01B55A2F-DEAB-4142-B2CF-1207258F32E5/SAMPLEAPP.app/Frameworks/**THIRDPARTY.framework/THIRDPARTY**

 Expected in: <2BD7059E-F63D-31FB-BC86-137609375FD3> /Users/Library/Developer/CoreSimulator/Devices/0DB97CE5-10D4-4A9F-ACD0-1F40BF41BD9E/data/Containers/Bundle/Application/01B55A2F-DEAB-4142-B2CF-1207258F32E5/SAMPLEAPP.app/Frameworks/**Alamofire.framework/AlamofireiOS** cocoapods giving dyld: Symbol not found:  when the application is launched

The third party library requires post_install script to be written in pod file to make it work.

if ['ThirdParty','Alamofire'].include? target.name
  target.build_configurations.each do |config|
    config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
 end
end

The Main Applicationn has below post_install script

post_install do |installer|
 installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
   config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
   config.build_settings.delete 'IPHONES_DEPLOYMENT_TARGET'
   config.build_settings['SWIFT_VERSION'] = ‘XX.0’
   config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
   end
 end
 end

I have also tried to debug in device but its giving similar error.

Any help in right direction would be highly appreciated. Thanks in advance

0 Answers
Related