Subsequent month marks the 10 yr 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 every little thing 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 performed I had a bundle that might construct with out complains with a easy swift construct
. However for those who even have unit assessments you then need these to be conformant with the SPM ecosystem as nicely. This includes largely including the sources – if any – required by the take a look at circumstances and including a take a look at goal to the bundle.swift
.
I used to be making some modifications after which operating swift take a look at
, rinse and repeat. Each iteration you discover a couple of extra minor issues you must handle. Till in the long run each constructing and testing the bundle go with out errors.
The end result of this train – I like to inform myself to justify all this time spent – is that your importing and setup has turn into extra sturdy.
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 eventually submitted an addition requisition to the Swift Package deal Index. It’s been some time since I had performed that final (couple of years truly) so I used to be confused initially by a GitHub bot stating that some further evaluate was required.
However that was resolved in the long run 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 mixture of my regular license and a full industrial license. Principally buying my guide grants you a perpetual full industrial license. In the event you don’t wish to try this there’s my customary open supply license. Thereby you must attribute to me when utilizing BarCodeKit in your apps, or purchase a non-attribution license on my elements retailer.
Associated
Classes: Administrative