Cocoapods vendored frameforks cause "Multiple commands produce ..." error

36 Views Asked by At

I am developing an Expo iOS module and need to use frameworks provided by a company. I have specified my framework files like this in the podspec file:

s.vendored_frameworks =
  'Frameworks/EnQualify.xcframework',
  'Frameworks/IDVerification_arm64.xcframework'

After running pod install, frameworks are listed double like this under Pod -> Development Pods:

Lsited framworks under Development Pods

When try to build the project I get this error:

Multiple commands produce '.../Build/Products/Debug-iphoneos/EnquraModule/EnquraModule.framework/Headers/EnQualify-Swift.h'

Multiple commands produce '.../Build/Products/Debug-iphoneos/EnquraModule/EnquraModule.framework/Headers/EnVerify.h'

Multiple commands produce '.../Build/Products/Debug-iphoneos/EnquraModule/EnquraModule.framework/Headers/IDVerification-Swift.h'

Multiple commands produce '.../Build/Products/Debug-iphoneos/EnquraModule/EnquraModule.framework/Headers/IDVerify.h'

If I add the framework by listing it as a dependency it doesn't give error:

s.dependency 'EnVerify', '1.3.14.2'

But this time the framework can't locate the Alamofire dependency at runtime and my app crashes although it is located at the path where it says it can't find it,

dyld[1235]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E
  Referenced from: <585CB2CE-BF96-3640-8199-AF873BD30339> /private/var/containers/Bundle/Application/A45664A4-6079-49C8-B8F3-402131DD8316/ortakhisse.app/Frameworks/EnQualify.framework/EnQualify
  Expected in:     <AEBE2340-E54C-3254-B4EB-FFA0D7B4A7A7> /private/var/containers/Bundle/Application/A45664A4-6079-49C8-B8F3-402131DD8316/ortakhisse.app/Frameworks/Alamofire.framework/Alamofire

So what I need is add the framework manually without "multiple commands" error.

How can I fix this?

I am using Mac OS X Sonoma 14.2.1 and Xcode 15.0.1

0

There are 0 best solutions below