-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUMM-671 DatadogObjC target is fixed for SPM #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried adding
linkerSettings: [
.linkedFramework("Foundation")
]
to the DatadogObjc
target in Package.swift
? If it solves the problem, this should be IMO preferred solution. Otherwise, we could easily miss import Foundation
in any new file added to the DatadogObjc
and the issue will be back there.
If we plan to include two patches in a hotfix, please create the |
@ncreated it's weird that Xcode can compile the project, when i create new project it fails when UPDATE: |
SPM Dep Manager test now imports DDObjC instead of DD DDObjC links DD statically so it contains DD inside
896fa0a
to
80cbf8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's weird that Xcode can compile the project, when i create new project it fails when import Foundation is absent 🤔
I guess it may depend on the Xcode version used to create the project.
What and why?
DatadogObjC
wasn't compiling with @objc attribute used without importing module 'Foundation' errorsThis only happens in Swift Package Manager; other dependency managers work fine
For more info: #218
How?
I added
import Foundation
lines to source files.I also made dep-manager-test/spm import
DatadogObjC
instead ofDatadog
, this should test both targets at once.Note: I'm still investigating how come Xcode manages to build the project without those imports 🤔
Release info
This PR is branched off from 1.3.0 tag and to be merged into master
We will ship this change as a hotfix once it is merged
Review checklist