Making A Cross-Platform Swift Framework

February 20, 2018 | Swift, Dependency Management, Architecture, iOS, macOS, tvOS, watchOS

With technologies like handoff and continuity, a unified developer program, and many of the same system frameworks available on all four of its platforms, Apple has been moving over the past few years to more seamlessly integrate its ecosystem of devices. This presents a great opportunity for us to bring our apps to each platform while reusing a lot of the app logic we've already written.

Sharing Localizations In A Reusable Framework

February 6, 2018 | Swift, Localization, iOS, macOS, tvOS, watchOS

Localization is a great way to expand the potential customer base of your apps. Xcode makes it easy to add localization to an app, but what if you want to provide reusable localizations in a framework? You may be using the same strings in multiple apps or on multiple platforms, or you may be writing an open-source framework . . .

Using URLSession & Codable Together

January 23, 2018 | Swift, Networking, iOS, macOS, tvOS, watchOS

Almost every app we write needs to retrieve and serialize data from an API. Networking and serialization are not easy problems to solve, which is why open-source frameworks like Alamofire, Moya, and SwiftyJSON have been written to simplify this task. However, using URLSession and the new Codable protocol introduced in Swift 4 . . .

Building A PDF Viewer With PDFKit in iOS 11

January 16, 2018 | Swift, PDFKit, iOS, macOS

PDFKit has been available to Mac developers since 10.4, but with iOS 11 Apple brought its support for viewing, editing, and authoring PDFs to iPhone and iPad. Previously, viewing PDF files meant rendering each page yourself with Core Graphics and Core Text, using an indirect solution like UIWebView or QuickLook, or . . .

Keychain Services Core Concepts

January 9, 2018 | Swift, Authentication, Security, iOS, macOS, tvOS, watchOS

Most apps need to store sensitive user information at some point. Most commonly it's a service-specific credential like a password or authentication token, but it could also be an encryption key, expiration date, or really anything private to the user that shouldn't be easily accessible on the device.