Join Todd Perkins for an in-depth discussion in this video Using local data storage, part of Building a Note-Taking App for iOS 8.
- So let's look at some of the different storage options…for iOS.…You can use User defaults,…create arbitrary file types…or use Core Data with SQLite databases.…User defaults are simply key/value pairs.…They're managed through Swift or Objective-C…and they're stored in XML files that are managed…through the API.…It's important to note, however, that user defaults…are stored in an unencrypted format.…For file storage, files can be created and read…on persistent media.…
There are no special file types that you have to adhere to…so you can store XML, JSON, delimited data files,…anything else including your own custom file types…which you can actually associate with your application.…Files can even be created at runtime in local…or shared file locations.…That means that you can share your application data…with other apps if you'd like.…Finally, we'll look at Core Data and SQLite.…Core Data uses structured data that can be saved…in a SQLite database.…
iOS actually provides built-in support for SQLite.…These classes and interfaces are in the Core Data package…
Each of these courses helps you build a complete mobile app from scratch; this installment uses the iOS SDK and Xcode to get the job done. Author Todd Perkins shows you how to create an Xcode project, lay out apps visually, connect UI elements to code, and save data to persistent storage. Start here with iOS 8, and compare your results with the Android and Windows Phone courses to learn about the differences and similarities of these mobile platforms.
- Previewing the note-taking app's features
- Creating the Xcode project
- Using local data storage
- Creating a data class
- Saving data to a file or user defaults
- Understanding screens and storyboards
- Controlling transitions between views
- Connecting the controller to the data
- Creating, editing, and deleting notes