Working With Private CocoaPods

March 6, 2018 | Swift, Dependency Management, Architecture, iOS, macOS, tvOS, watchOS

In the last tutorial, we built a cross-platform Swift framework. If you want to reuse your frameworks in other projects, the next step is to support dependency managers. The three most popular right now are CocoaPods, Carthage, and Apple's Swift Package Manager.

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 . . .

Responding To Keyboard Events in iOS

January 30, 2018 | Swift, View Controllers, iOS, UIKit

Wherever users can enter text in our apps, we usually need to respond to keyboard events. Adjusting our app's UI when the keyboard is shown and dismissed is necessary to maintain a good user experience. But what if we have multiple screens in our app that need to respond to keyboard events?

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 . . .