Closed ricobeck closed 3 years ago
I needed SPM for my project so maybe it's useful for others too.
I added SPM support in my own branch too (https://github.com/DerekK19/BluetoothKit.git). My version does work - sorry I did not test ricobeck branch yet. I guess this is just another vote for SPM support for BluetoothKit. I won't submit my own pull request, just wait for progress on this one.
FWIW In my branch, the main issue was that as well as moving the source to a Sources folder, I needed to modify pretty much every .swift class to add @available(OSX 10.13, iOS 10.0, *) declarations, because BluetoothKit uses CoreBluetooth, which is not available in early versions of the SDKs and SPM requires that the code must compile with every SDK version. I seem to remember a request in Swift Package Manager itself for minimum SDK versions in the package definition which would save having these individual @available lines, but I don't know where that's sitting.
Oh, I also used a tag version of 0.5.0 - it's a bit more that a bug fix version update
Upvote on this one. Thank you very much!
I just tried out the project but was a little scared by the amount of warning. So I reduced them down to one. The TODO in
BKContinousScanner.swift:101
is still there.