Subsequent month marks the 10 12 months anniversary of BarCodeKit. It’s been like two years of slumber because the final launch. It was accessible by way of Cocoapods and direct by way of GitHub, however recently a number of builders voiced curiosity for it to be accessible as Swift Package deal.
Like most of my open supply frameworks on GitHub, BarCodeKit is written in Goal-C, however that doesn’t imply it couldn’t be accessible as Swift Package deal. Xcode automagically morphs all the pieces to look Swift-native and so an implementer of such a bundle wouldn’t be the wiser.
To make it a Swift bundle I wanted to wash up some methods how system frameworks are imported, what headers are imported the place and most significantly I needed to ditch the precompiled headers (PCH) which aren’t supported by SPM.
As soon as that was finished I had a bundle that may construct with out complains with a easy swift construct
. However when you even have unit assessments then you definitely need these to be conformant with the SPM ecosystem as nicely. This includes largely including the sources – if any – required by the check circumstances and including a check goal to the bundle.swift
.
I used to be making some modifications after which working swift check
, rinse and repeat. Each iteration you discover a number of extra minor issues you need to deal with. Till ultimately each constructing and testing the bundle go with out errors.
The result of this train – I like to inform myself to justify all this time spent – is that your importing and setup has develop into extra strong.
So right here we go. I submitted the brand new 1.4.0 model to Cocoapods, tagged it on GitHub as a launch on the grasp department, and at last submitted an addition requisition to the Swift Package deal Index. It’s been some time since I had finished that final (couple of years truly) so I used to be confused initially by a GitHub bot stating that some further overview was required.
However that was resolved ultimately by Mr. Dave Verwer himself approving the merge. Many thanks, I’m honored, Sir!
And in case you marvel why it says “unknown license” on Swift Package deal Index… it’s because the license is a mix of my regular license and a full industrial license. Mainly buying my e book grants you a perpetual full industrial license. If you happen to don’t need to do this there’s my customary open supply license. Thereby you need to attribute to me when utilizing BarCodeKit in your apps, or purchase a non-attribution license on my components retailer.
Associated
Classes: Administrative