Closed gmoraleda closed 4 months ago
~I was able to solve this issue by specifying my library type as dynamic
in the Package manifest. In case it helps other folks.~
Sadly, the Testflight version would crash immediately due to the missing dynamic library. I reopen the issue in case anyone has other ideas about how to fix this.
This is a real issue we've been seeing for a year+.
One way to work past it might be to xcodebuild build-for-testing
then xcodebuild test-without-building
. I haven't found a workaround that allows executing tests within Xcode.
Hey @gmoraleda and @pm-dev
I'm very sorry for such a long reply, we totally missed it.
I'm not able to replicate, here the sample project I have setup: sample.zip
The test target compiles and run fine in my case. Do you have sample project that replicate the issue?
Thanks!
This seems to happen during incremental builds with a specific dependency hierarchy, so it's a bit hard to reproduce despite it happening frequently in my project. Although this is likely an spm/xcodebuild bug where the build gets confused by from DatadogInternal, there may be a workaround that prevents this. I'll keep working on a consistent repro.
Closing this issue due to inactivity. We're unable to reproduce this problem on our side. If it still persists (there were both SDK and Xcode updates since it was first opened) please attach sample project that we can look into and we will re-open it.
The issue
I've integrated DD in a custom Swift Package. Importing that package into my app target works flawlessly. I'm facing issues when building for testing. The compiler throws the following errors:
Datadog SDK version:
2.1.2
Last working Datadog SDK version:
N/A
Dependency Manager:
SPM
Xcode version:
Version 14.3 (14E222b)
Swift version:
swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
Deployment Target:
iOS 15: iPhone
macOS version:
13.5.1 (22G90)
This is my Package.swift manifest:
The issue seems to be around DatadogInternal, which I require to inject the DatatodURLSessionDelegate in my Apollo client: