deege / deegeu-ios-user-defaults-example

Demonstrates storing three different data types into the standard NSUserDefaults using Swift 3.1 and iOS 10.3.

Home Page:http://www.deegeu.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Foolproof NSUserDefaults example in Swift 3.1 for iOS 10.3

The purpose of this repository is to supplement the video with code, and to provide a simple starting point to ad NSUserDefaults to your app.

The “A Foolproof NSUserDefaults example in Swift 2.0 for iOS 9” video demonstrates storing three different data types into the standard NSUserDefaults.

A Foolproof NSUserDefaults example in Swift 2.0 for iOS 9

The video uses Swift 2.0 and iOS 9 The code uses Swift 3.1 and iOS 10.3

This code has been updated since the making of the video (updated 04-03-2017). The code now requires two keys be set in the plist.info file: * NSPhotoLibraryUsageDescription * NSCameraUsageDescription These can be set to any value.

Code in the function imagePickerController has also changed to find selected images from the editingInfo dictionary.

You can find more iOS videos on the DeegeU channel

Getting started

The code is a self contained Swift project that can be loaded into XCode.

This code is written and compiled for Swift 3.1.

Known issues

There are two issues when running the application.

  1. objc[2962]: Class PLBuildVersion is implemented in both... This appears to be an issue on Apple's side. Neither library is controlled by this application. This only occurs in the emulator.
  2. [Generic] Creating an image format with an unknown type is an error Unknown cause, but does not appear to affect the application functionality.

Getting help

If you are having troubles getting the source code, please see Getting the source code or the video How to get code from GitHub

License

MIT: http://rem.mit-license.org

Feedback

Any feedback is welcome. You can contact me at dj at deegeu.com, the Facebook page, the Google+ page or on DeegeU.com.

Contributions

If you wish to contribute to any issues you find in the source code, please issue a pull request.

About

Demonstrates storing three different data types into the standard NSUserDefaults using Swift 3.1 and iOS 10.3.

http://www.deegeu.com

License:MIT License


Languages

Language:Swift 100.0%