Our DNA is written in Swift

BarCodeKit 1.4.0

Next month marks the 10 year anniversary of BarCodeKit. It’s been like two years of slumber since the last release. It was available via Cocoapods and direct via GitHub, but lately several developers voiced interest for it to be available as Swift Package.

Like most of my open source frameworks on GitHub, BarCodeKit is written in Objective-C, but that doesn’t mean it couldn’t be available as Swift Package. Xcode automagically morphs everything to look Swift-native and so an implementer of such a package wouldn’t be the wiser.

To make it a Swift package I needed to clean up some ways how system frameworks are imported, what headers are imported where and most importantly I had to ditch the precompiled headers (PCH) which aren’t supported by SPM.

Once that was done I had a package that would build without complains with a simple swift build. But if you also have unit tests then you want those to be conformant with the SPM ecosystem as well. This involves mostly adding the resources – if any – required by the test cases and adding a test target to the package.swift.

I was making some changes and then running swift test, rinse and repeat. Every iteration you find a few more minor things you have to address. Until in the end both building and testing the package go without errors.

The outcome of this exercise – I like to tell myself to justify all this time spent – is that your importing and setup has become more robust.

So here we go. I submitted the new 1.4.0 version to Cocoapods, tagged it on GitHub as a release on the master branch, and finally submitted an addition requisition to the Swift Package Index. It’s been a while since I had done that last (couple of years actually) so I was confused initially by a GitHub bot stating that some additional review was required.

But that was resolved in the end by Mr. Dave Verwer himself approving the merge. Many thanks, I’m honored, Sir!

And in case you wonder why it says “unknown license” on Swift Package Index… this is because the license is a combination of my normal license and a full commercial license. Basically purchasing my book grants you a perpetual full commercial license. If you don’t want to do that there’s my standard open source license. Thereby you have to attribute to me when using BarCodeKit in your apps, or buy a non-attribution license on my parts store.

Tagged as:

Categories: Administrative



  1. BarCodeKit 1.4.0 | Cocoanetics | Tech Mastery
  2. BarCodeKit 1.4.0 | Cocoanetics -
  3. BarCodeKit 1.4.0 | Cocoanetics -
  4. BarCodeKit 1.4.0 | Cocoanetics -

Leave a Comment