Using a Core Data Model in Swift Playgrounds

Did you know that you can tinker with Core Data inside of Swift playgrounds in Xcode? You can! Jeremiah Jessel, author at http://www.learncoredata.com, wrote up an article in 2015 detailing how you can use the Core Data framework inside a playground. He shows how you can do everything from setting up the Core Data stack, […]

Force Unwrapping Swift Optionals: Code Smell!

Do you find your Swift code riddled with !‘s? I’m becoming more and more uncomfortable with seeing ! throughout my Swift code. It’s just a matter of time before it’s going to bite me. Often, I do it because it’s the “easy thing” to do at the time. But it’s dangerous. Swift optionals are trying […]

Is Protocol Oriented Swift Better than Object Oriented Swift?

A question was asked on Reddit and showed up in my feed as I was browsing this weekend: What does protocol oriented programming mean, and why is it better than OOP? I really like a few things that were said in one of the top “Explain Like I’m 5″ comments that was posted in response […]

Extracting a PKCS7 Container for Receipt Validation with Swift

So you’ve prepared to test receipt validation by setting up your app in iTunes Connect. You’ve brought in a cryptography library like OpenSSL to be able to work with the PKCS #7 container that acts as the “envelope” for the receipt. Perhaps you’ve even done it the “easy way” with CocoaPods. You’ve located and loaded […]

Creating Calendar Events with Event Kit and Swift

Folks have asked more about working with Event Kit and Swift, so the series continues with this guide on how to create calendar events with Event Kit and Swift! Previous guides in the series include the following: Previous Guides Beginner’s Guide to Event Kit in Swift – Requesting Permission Creating Calendars with Event Kit and […]

Swift Cheat Sheet for Dates, Formatters, & Date Components

Working with NSDate, NSDateFormatter, and NSDateComponents can be a little convoluted, so I’ve created myself a cheat sheet that will be updated as I discover new tips and tricks in this realm. The new cheat sheet can be found over at GitHub in the form of an Xcode Playground: Resources Swift Dates Cheat Sheet Playground […]

Parse PFCloud – “JSON text did not start with array or object”

It’s always the little things that lead to flatter foreheads (or at least it is for me). Banging my head against the desk this evening working on a Parse migration, I finally figured out what was causing an error condition in a PFCloud function call. The request to the server succeeded, but the response was […]

Working with Swift: Adopt a Protocol or Pass a Function?

Without fail, any time Rob Napier (@cocoaphony) speaks or writes, I gain insight into new and deeper ways to solve problems with Swift. In January 2016, he gave a talk at dotSwift, and I wanted to record my thoughts on something he said that made a lot of sense when it comes to the topic […]

Listing Calendar Events with Event Kit and Swift

This is the continuation of a series of articles I’ve writing for Swift developers working with Event Kit. Supposing that after asking the user for permission to use their calendars, and even allowing users to create new calendars from within your iOS app, one possible next step could be to list out all of the […]

Adding Buttons to the Navigation Bar with Storyboards

If you’re having trouble figuring out how to add buttons to the navigation bar in your Storyboard-based iOS app, my goal in this article is to help you through the process. Knowing what to click and where to drag to get things wired up isn’t entirely intuitive, so I want to be of help if […]