Local Receipt Validation for iOS in Swift From Start to Finish

Local 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 spot so that I could wrap my head around the whole process. I’ve been working on some code for a while, and this […]

Finalizing 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 continuation of my receipt validation series. I’m assuming that… You’ve prepared to test receipt validation by setting up […]

Receipt 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 receipt validation series. I’m assuming that… You’ve prepared to test receipt validation by setting up your […]

Receipt 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 the “envelope” for the receipt. Perhaps you’ve even done it the “easy way” with CocoaPods. You’ve located and loaded the […]

Using 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 persistent store. Creating the stack with NSPersistentContainer handles the creation of SQLite stores internally, so brand new setups using NSPersistentContainer are pretty easy. But how do you […]

Why is it called a “Closure” anyway? A Swift Conceptual Look.

Bottle with cork

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 naming, so if you can figure out that essential “Why’d they name it that?” question, you might […]

A 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 Stack with Backwards Compatibility in Swift — that process still works perfectly fine in iOS 10+. Alternatively, you […]

Why Do We Need to Annotate Escaping Closures in Swift?

Why Do We Need to Annotate Escaping Closures?

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 story… :] Several readers commented here and on Medium with the question, “Why? Why do we need to […]

What in the World is an “Escaping Closure” in Swift?

Escape

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 consuming other peoples’ APIs in to the realm of creating your own (and you do this […]

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 Data Fundamentals with Swift! I admit – it might have taken me less time to figure out my runtime exception if I hadn’t just migrated […]