DataDog / dd-sdk-ios

Datadog SDK for iOS - Swift and Objective-C.
Apache License 2.0
205 stars 123 forks source link

Xcode16: Symbol not found when using Cocoapods #2059

Open lukas-koblmueller opened 5 days ago

lukas-koblmueller commented 5 days ago

Stack trace

dyld[78821]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E Expected in: /Frameworks/DatadogInternal.framework/DatadogInternal

Reproduction steps

  1. Use Xcode 16.0
  2. Implement Datadog via Cocoapods
  3. Run on device

Volume

All

Affected SDK versions

2.17.0

Latest working SDK version

-

Does the crash manifest in the latest SDK version?

Yes

Deployment Target

12.0 or 13.0

Device Information

No response

Other relevant information

Adding the post-install hook: post_install do |installer| installer.pods_project.targets.each do |target| if ['DatadogRUM', 'DatadogCore', 'DatadogInternal'].include? target.name target.build_configurations.each do |config| config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' end end end end fixes this issue on Xcode15, but not on Xcode16 anymore.

lukas-koblmueller commented 4 days ago

This is only when still building with Xcode15, when re-building Datadog.xcframeworks with Xcode16 it works. But normally i would expect that also building with Xcode15 should work.

maciejburda commented 3 days ago

Hello @lukas-koblmueller

Thanks for tuning in!

I've made a fresh Xcode16 project (using these hints from CocoaPods repo).

I managed to make it work and build on iOS 18 device without any issues. CocoaPodsXcode16Test.zip

Could you provide a sample project that reproduces the issue?