Valet icon indicating copy to clipboard operation
Valet copied to clipboard

Package.swift: adds .dynamic library

Open AndrewSB opened this issue 3 years ago • 4 comments

AndrewSB avatar Mar 30 '21 07:03 AndrewSB

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 30 '21 07:03 CLAassistant

@AndrewSB thank you for the contribution! I haven't shipped an app with SPM yet, so I'm a bit new to how SPM works with dynamic libraries. Ideally, it'd be possible for you to state at integration time in your app that you want a dynamic version of the Valet package we're providing. Is that only possible if we create a .dynamic library target?

From a little googling, it seems possible to create your own package that vends a dynamic library that depends on our library, though that's clearly not ideal.

I don't love the approach provided in this PR since it seems like we're papering over an issue with SPM + Xcode. But... if it is indeed the only way forward...

dfed avatar Mar 31 '21 03:03 dfed

state at integration time in your app that you want a dynamic version of the Valet package we're providing. Is that only possible if we create a .dynamic library target?

yup, its not ideal.

since making this, I've learned that Xcode 12.5b3 makes libraries dynamic if required automatically, if the type isn't specified. lets leave this PR open for a couple days while i finish testing, and i'll respond here if i think this change is necessary

AndrewSB avatar Apr 01 '21 02:04 AndrewSB

Exciting that Xcode might fix this for us! Keep us posted 🙂

dfed avatar Apr 01 '21 03:04 dfed

Closing this out – if this PR is still relevant feel free to re-open and let us know the current status here.

dfed avatar Oct 12 '22 13:10 dfed

it isn't! new Xcode totally handles this fine

AndrewSB avatar Oct 12 '22 21:10 AndrewSB