[SPM] Support Swift Package Manager#29
Conversation
333a2f5 to
ace8661
Compare
cecc52b to
7e0b943
Compare
hadiidbouk
left a comment
There was a problem hiding this comment.
I was checking something that fails in the immi project and I saw this PR 👍🏻
| linkerSettings: [ | ||
| .linkedFramework("Foundation"), | ||
| .linkedFramework("UIKit", BuildSettingCondition.when(platforms: [.iOS, .tvOS])), | ||
| .linkedFramework("AppKit", BuildSettingCondition.when(platforms: [.macOS])) |
There was a problem hiding this comment.
I think we can omit the BuildSettingCondition from here 🤔
There was a problem hiding this comment.
Yes, I don't even think the linkerSettings section is needed though. I'll try removing the section and see how that goes.
There was a problem hiding this comment.
I think It's similar to using UIKit that already contains Foundation?
By importing the DataSource we can then remove the UIKit or Foundation imports from our code?
There was a problem hiding this comment.
@hadiidbouk nope, the import are not transitive, we still need to import Foundation & import UIKit when using the relevant APIs. When using an ObjC bridging header however, Foundation is usually implicitly imported
| .target( | ||
| name: "DataSource", | ||
| path: "DataSource", | ||
| exclude: ["Info.plist"], |
There was a problem hiding this comment.
We are excluding the Info.plist file to avoid conflicts when adding this library to a project?
There was a problem hiding this comment.
We need to exclude it otherwise the build system tries to compile the plist file, and fails.
Feat
Note
As SPM still lacks support for testing other than for the macOS platform, I decided not to include a test target.