insidegui / MultipeerKit

MultipeerConnectivity + Codable = ❤️
BSD 2-Clause "Simplified" License
1.1k stars 71 forks source link

Add dynamic library product #6

Closed finestructure closed 4 years ago

finestructure commented 4 years ago

This fixes an issue using the library in an app with frameworks in Xcode 11.4 (which has some known issues with this):

error: Swift package product 'MultipeerKit' is linked as a static library by 'Arena' and 'HistoryTransceiver'. This will result in duplication of library code.

Now it's possible to select the -dynamic library variant to work around this.

Changing the main target to .dynamic would also work of course but I believe that poses issues with command line tools that need/want static linking, so changing to .dynamic isn't a universal fix.

insidegui commented 4 years ago

Thanks!