NSCoding Tutorial for iOS: How to Permanently Save App Data | raywenderlich.com

In this NSCoding tutorial, you’ll learn how to save and persist iOS app data so that your app can resume its state after quitting.

This is a companion discussion topic for the original entry at https://www.raywenderlich.com/6733-nscoding-tutorial-for-ios-how-to-permanently-save-app-data

Unable to run starter project. Lot’s of errors. Using X Code 10 with Swift 4.2

Hello rbrew,
Thank you for pointing this out, and apologies for that :]
The materials have been updated, please re-download them, and please don’t hesitate to ask if you encountered any issues, or needed something to be clarified :]

Thank-you for this informative tutorial. One small syntax issue. print(documentsDirectoryURL.absoluteString) needs to be print(privateDocsDir.absoluteString) to avoid “Use of unresolved identifier ‘documentsDirectoryURL’” compiler warning.

@ehabamer Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hello @marcy, I checked the line you mentioned and I suspect that you didn’t place the print in the correct block, it should be entered within the initialization block of “privateDocsDir”.
It will have a variable named “documentsDirectoryURL” defined (which is what is being returned to initialize it.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!