launchdarkly / swift-eventsource

Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
https://launchdarkly.github.io/swift-eventsource/
Other
196 stars 36 forks source link

Enable dynamic linking in SPM #21

Closed jcislinsky closed 3 years ago

jcislinsky commented 3 years ago

Is your feature request related to a problem? Please describe.

Xcode 12.5 (now in Beta) can resolve packages without specified type as dynamic and therefore resolve an issue with statically linked dependencies in multiple targets (app, extension, …).

But this library defines the static type of package LDSwiftEventSourceStatic. And so Xcode is not able to resolve dependencies successfully.

Swift package product 'LDSwiftEventSourceStatic' is linked as a static library by 'app' and 'extension'. This will result in duplication of library code.

Describe the solution you'd like

Keep package type empty or use dynamic.

torchhound commented 3 years ago

Hi @jcislinsky thanks for reporting this.

Filed internally as 104805

gwhelanLD commented 3 years ago

Hi @jcislinsky,

Could I ask you for a bit more clarification around this issue? The SPM package file defines both a dynamic and static target for this library. Is there something you'd like to see these build products? If your issue is regarding how the LaunchDarkly iOS SDK includes this library as a dependency, could you please file an issue on the SDK issue tracker?

Thanks! @gwhelanLD

gwhelanLD commented 3 years ago

Since we haven't gotten any clarification on this issue, I'll close it for now. Feel free to reopen with more information if you're still running into this issue.

Thanks, @gwhelanLD