Bret W. Lester

Third Party Risk

It's hard to get anything done without incorporating some 3rd party libraries into your project. You should absolutely do it. The question is, when should you use a library, and when should you write it yourself? Conventional wisdom says that if it involves the core functionality of your app, prefer to write it yourself (or use open source, which you could theoretically fix & extend if needed).

Notice that I said "prefer" to write it yourself. For cases where that's not an option, you have to jump in and pray for the best. We'll call this the "sub-optimal scenario."

Unfortunately, I've gotten myself into the sub-optimal scenario with a couple of my apps, and the culprit is Apple's PDFKit. I don't know if you've taken a look at the landscape of PDF SDKs out there lately, but suffice it to say, there aren't many options for a high-level (as in abstraction layer) Swift developer unless you're willing to pay through the nose. I'm definitely not up to writing one myself. That would be a nightmare.

So, given the circumstances, PDFKit was an easy choice, but I was quick to find out that it has bugs that will definitely make your app look bad (and users don't differentiate between your app and the libraries it relies on, so those will definitely manifest as bad reviews). Not only is it subpar in terms of quality & attention to detail, it is a closed-source third-party library from a company notorious for ignoring developer feedback. So every time there is an OS update, you're at risk of something breaking, which has happened to me several times, mind you.

PDFKit is serviceable. I definitely wouldn't call it good, but it's serviceable. It has many rough edges that could be smoothed out if the SDK was open source.

What spurred me to write this post was the fact that, as I write this, PDFKit is broken in the iOS 17 beta—something that was brought to my attention by a customer, bless 'em. I've filed feedback and all that (FB12951475), but knowing what I know about Apple, there is a high likelihood that iOS 17 will go public without a fix. In fact, there's no telling how long they will go without fixing it. I'm in the dark.

So, unless I'm able to find a workaround between now and the time iOS 17 goes public, I'll be in the unfortunate position where a core part of my apps' functionality will be buggy and wrong. Customers will just assume it's my fault, and the reviews will reflect as much.

Hopefully, there will be a timely solution (whether a workaround or Apple fixes it), because the last thing I want is to be wasting my life energy on shoehorning an alternative PDF SDK into my apps.

For now, I remain optimistic.

§

Listen to documents and web articles like this one using lifelike text-to-speech. Try WebOutLoud free.

More Posts

RSS