Core Data Model Attributes and NSManagedObject Property Types Must Match!
Jump to… Data model Attributes and NSManagedObject property types – Match ’em! Optionals are Types Lessons learned Was this article helpful? Please share! Learning Core Data? Watch my course, Core...
View ArticleEvery Developer is an API Designer
Every function; every class; every struct and enum and protocol is an API. YOU — are an API designer As developers, we move into and out of the role of “API Designer” constantly. Have you ever thought...
View ArticleWhat in the World is an “Escaping Closure” in Swift?
If you’re mostly in the business of coding up closures to pass off to other functions as callbacks, you may not have run into the concept of an “escaping closure” yet. When you step out of the role of...
View ArticleWhy Do We Need to Annotate Escaping Closures in Swift?
My last entry on escaping closures ended up having way more interaction than I anticipated! It goes to show that you never know what the impact of a piece of writing will have. But that’s a different...
View ArticleA Swift Implementation of the Core Data Stack Using NSPersistentContainer
If you’re targeting iOS 10 and above, you’ve got the opportunity to pick your poison when it comes to creating the Core Data stack. You could opt for the process I described in Creating the Core Data...
View ArticleWhy is it called a “Closure” anyway? A Swift Conceptual Look.
What’s in a name? If a programming language comes with a named feature, you can be pretty sure it was named that way for a reason. It’s a safe bet that the language designers were purposeful in their...
View ArticleUsing an Existing SQLite Store with NSPersistentContainer
If you’ve been creating the Core Data Stack without NSPersistentContainer and you’re thinking about switching things up to use NSPersistentContainer, you need to think about your existing SQLite...
View ArticleReceipt Validation – Verifying a Receipt Signature in Swift
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...
View ArticleReceipt Validation – Parse and Decode a Receipt with Swift
The aim of this guide is to help you parse a receipt and decode it so that you have readable pieces of metadata to inspect and finalize all of the receipt validation steps. This is a continuation of my...
View ArticleFinalizing Receipt Validation in Swift – Computing a GUID Hash
The aim of this guide is to help you finalize the receipt validation process by computing the GUID hash for your app, and comparing it to the hash that’s stored within your receipt itself. This is a...
View ArticleLocal Receipt Validation for iOS in Swift From Start to Finish
Local receipt validation in Swift doesn’t seem to be widely written about. I’ve been able to find snippets of code scattered across the Internet, but nothing that brought everything together in one...
View ArticleSwift 4 Upgrade Error: ‘init(colorLiteralRed:green:blue:alpha:)’ is unavailable
I upgraded a project to Swift 4 today and hit a compiler error: ‘init(colorLiteralRed:green:blue:alpha:)’ is unavailable: This initializer is only meant to be used by color literals. The fix is pretty...
View ArticleSwift Cheat Sheet for iPhone Camera Access & Usage
This is a cheat sheet of the code and workflow for iPhone camera access and usage, from requesting permission to using the photo taken with a user’s device. Jump to… Framework Import Set Camera Usage...
View ArticleSwift Cheat Sheet for iPhone Location Services Access & Usage
This is a cheat sheet of the code and workflow for iPhone location access and usage, from requesting permission to using the location of the user’s device. Jump to… Framework Import Set Location Usage...
View ArticleThe Case for CloudKit
Jump to… Developing for Apple Platforms Only? Expand Beyond Apple Platforms with CloudKit JS Want Built-in Authentication? CloudKit is Free for Longer Rolling Your Own Backend? Company Requirement:...
View ArticleDo Core Data Entities Need Primary Keys?
In this video I pop the hood on Core Data’s SQLite persistent store to discover the details about whether or not you need to add a property representing a “primary key” for your Core Data Entities....
View ArticleCloudKit Fundamentals
I’ve been hard at work on a new course for Pluralsight called “CloudKit Fundamentals“, and I’m thrilled to announce that the course is now LIVE in the Pluralsight library! At the core of developing a...
View Article