Data Persistence in iOS
            Michał Tuszyński
       iOS/Android developer at appvetica




   @srgtuszy       srgtuszy.github.com
Roadmap
Roadmap
1. NSUserDefaults
Roadmap
1. NSUserDefaults
2. NSCache
Roadmap
1. NSUserDefaults
2. NSCache
3. NSCoding protocol
Roadmap
1. NSUserDefaults
2. NSCache
3. NSCoding protocol
4. CoreData
Roadmap
1. NSUserDefaults
2. NSCache
3. NSCoding protocol
4. CoreData
5. iCloud
What are
NSUserDefaults?
What are
           NSUserDefaults?

Key-value local storage, capable of storing both objects
                and primitive data types
What should not be stored in
     NSUserDefaults?
What should not be stored in
           NSUserDefaults?

1. Sensitive data
What should not be stored in
           NSUserDefaults?

1. Sensitive data
2. Heavy objects
What should not be stored in
           NSUserDefaults?

1. Sensitive data
2. Heavy objects
3. Big amounts of data
Demo
What if I need a mechanism to cache big
           amount of objects?
What if I need a mechanism to cache big
           amount of objects?


           ...use NSCache!
Why NSCache?
Why NSCache?
Similar api to NSMutableDictionary class
Why NSCache?
Similar api to NSMutableDictionary class


    - (void)setObject:(id)obj forKey:(id)key;
    - (void)removeObjectForKey:(id)key;
Why NSCache?

Why not just use NSMutableDictionary then?
Why NSCache?
Why not just use NSMutableDictionary then?
Why NSCache?
Why not just use NSMutableDictionary then?

   - NSCache takes care of memory management
Why NSCache?
Why not just use NSMutableDictionary then?

   - NSCache takes care of memory management
   - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num;
   - (void)setTotalCostLimit:(NSUInteger)lim;
Why NSCache?
Why not just use NSMutableDictionary then?

   - NSCache takes care of memory management
   - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num;
   - (void)setTotalCostLimit:(NSUInteger)lim;




   - Will let you know when it disposes data (NSCacheDelegate)
Why NSCache?
Why not just use NSMutableDictionary then?

   - NSCache takes care of memory management
   - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num;
   - (void)setTotalCostLimit:(NSUInteger)lim;




   - Will let you know when it disposes data (NSCacheDelegate)
   - (void)cache:(NSCache *)cache willEvictObject:(id)obj
Demo
How to store custom objects?
How to store custom objects?
         Using archives!
What are archives?
What are archives?
Archives provide a means to convert objects and values
    into architecture-independent stream of bytes
What are archives?
Archives provide a means to convert objects and values
    into architecture-independent stream of bytes
                      Apple documentation
Archives
Archives
Archives




Keyed archives
Archives




Keyed archives
Archives




Keyed archives              Sequential archives
What is the difference?
What is the difference?
What is the difference?

Sequential archives
What is the difference?

  Sequential archives
-Encoded from root object
through all interrelated objects
What is the difference?

  Sequential archives
-Encoded from root object
through all interrelated objects

-Must be decoded in the same
order it was encoded
What is the difference?

  Sequential archives              Keyed archives
-Encoded from root object
through all interrelated objects

-Must be decoded in the same
order it was encoded
What is the difference?

  Sequential archives                  Keyed archives
-Encoded from root object          -Each object is assigned a key
through all interrelated objects

-Must be decoded in the same
order it was encoded
What is the difference?

  Sequential archives                  Keyed archives
-Encoded from root object          -Each object is assigned a key
through all interrelated objects

-Must be decoded in the same
order it was encoded

      NSArchiver
What is the difference?

  Sequential archives                  Keyed archives
-Encoded from root object          -Each object is assigned a key
through all interrelated objects

-Must be decoded in the same
order it was encoded

      NSArchiver                        NSKeyedArchiver
How to create an archive out of a custom object?
How to create an archive out of a custom object?


 1.Implement NSCoding protocol inside the object
How to create an archive out of a custom object?


 1.Implement NSCoding protocol inside the object
            - (id)initWithCoder:(NSCoder *)decoder;

            - (void)encodeWithCoder:(NSCoder *)encoder;
How to create an archive out of a custom object?


 1.Implement NSCoding protocol inside the object
            - (id)initWithCoder:(NSCoder *)decoder;

            - (void)encodeWithCoder:(NSCoder *)encoder;




 2. Use one of the NSCoder subclasses to get your archive
Demo
Core Data
CoreData is an efficient framework to manage your object
                       persistence
CoreData is an efficient framework to manage your object
                          persistence

Main features:
CoreData is an efficient framework to manage your object
                           persistence

Main features:
-Change tracking and undo support
CoreData is an efficient framework to manage your object
                           persistence

Main features:
-Change tracking and undo support
-Relationship between entities maintenance
CoreData is an efficient framework to manage your object
                           persistence

Main features:
-Change tracking and undo support
-Relationship between entities maintenance
-Automatic validation of property values
CoreData is an efficient framework to manage your object
                           persistence

Main features:
-Change tracking and undo support
-Relationship between entities maintenance
-Automatic validation of property values
-Low memory overhead (Faulting)
What Core Data is not?
What Core Data is not?

-It is not a relational database
What Core Data is not?

-It is not a relational database
-It’s not a silver bullet for your code
How does it work?
How does it work?

      Storage
How does it work?

      Storage
How does it work?

          Storage




 NSPersistentStoreCoordinator
How does it work?

          Storage




                                The bridge between the storage
 NSPersistentStoreCoordinator         and the application
How does it work?

          Storage




                                The bridge between the storage
 NSPersistentStoreCoordinator         and the application
How does it work?

                                Storage




NSManagedObjectModel




                                                      The bridge between the storage
                       NSPersistentStoreCoordinator         and the application
How does it work?

                                              Storage




     NSManagedObjectModel



A collection of data models which
   are used in the application
                                                                    The bridge between the storage
                                     NSPersistentStoreCoordinator         and the application
How does it work?

                                              Storage




     NSManagedObjectModel



A collection of data models which
   are used in the application
                                                                    The bridge between the storage
                                     NSPersistentStoreCoordinator         and the application
How does it work?

                                              Storage




     NSManagedObjectModel



A collection of data models which
   are used in the application
                                                                    The bridge between the storage
                                     NSPersistentStoreCoordinator         and the application




                                      NSManagedObjectContext
How does it work?

                                              Storage




     NSManagedObjectModel



A collection of data models which
   are used in the application
                                                                    The bridge between the storage
                                     NSPersistentStoreCoordinator         and the application




                                                                     Scratchpad which communicates
                                                                                   with
                                      NSManagedObjectContext         NSPersistentStoreCoordinator to
                                                                               save changes
NSManagedObjectModel
NSManagedObjectModel
NSManagedObjectModel

  Entity
NSManagedObjectModel

  Entity




           Relationship
NSManagedObject
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
Can be created using following ways:
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
Can be created using following ways:
1. Designated initializer
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
Can be created using following ways:
1. Designated initializer
- (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext:
(NSManagedObjectContext *)context
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
Can be created using following ways:
1. Designated initializer
- (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext:
(NSManagedObjectContext *)context


2. Static method of NSEntityDescription class
NSManagedObject
- Generic class that implements all basic behavior
required by CoreData model object
- It’s not possible to use regular NSObjects with
Core Data
Can be created using following ways:
1. Designated initializer
- (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext:
(NSManagedObjectContext *)context


2. Static method of NSEntityDescription class
+ (id)insertNewObjectForEntityForName:(NSString *)entityName inManagedObjectContext:
(NSManagedObjectContext *)context
Create NSManagedObjects to represent your data model


                   NSManagedObject
                    NSManagedObject
                     NSManagedObject
NSManagedObjects are held in
           NSManagedObjectContext’s cache

NSManagedObject
 NSManagedObject
  NSManagedObject
NSManagedObjects are held in
           NSManagedObjectContext’s cache

NSManagedObject
 NSManagedObject
  NSManagedObject
NSManagedObjects are held in
           NSManagedObjectContext’s cache

NSManagedObject
 NSManagedObject       NSManagedObjectContext
  NSManagedObject
NSManagedObjects are held in
           NSManagedObjectContext’s cache

NSManagedObject
 NSManagedObject       NSManagedObjectContext
  NSManagedObject
NSManagedObjects are held in
           NSManagedObjectContext’s cache

NSManagedObject
 NSManagedObject       NSManagedObjectContext
  NSManagedObject




                                                Save
Demo
iCloud
Why should you use iCloud
         APIs?
Why should you use iCloud
           APIs?
1. There’s no need to configure and maintain servers
Why should you use iCloud
            APIs?
1. There’s no need to configure and maintain servers
2. Syncs across all devices without your effort
Why should you use iCloud
            APIs?
1. There’s no need to configure and maintain servers
2. Syncs across all devices without your effort
3. Autosaving and conflict resolving
Why should you use iCloud
            APIs?
1. There’s no need to configure and maintain servers
2. Syncs across all devices without your effort
3. Autosaving and conflict resolving
4. Easily revert to a previous version
iCloud
iCloud
iCloud




Document storage
iCloud




Document storage
iCloud




Document storage            Key-value storage
Document storage

      Application
       sandbox
Document storage

Application
 sandbox
Document storage

Application   iCloud-monitored
 sandbox          directory
Document storage

Application                   iCloud-monitored
              NSFileManager
 sandbox                          directory
Document storage

Application                   iCloud-monitored
              NSFileManager
 sandbox                          directory
Document storage

              setUbiquitous:YES

Application                       iCloud-monitored
               NSFileManager
 sandbox                              directory
Document storage

              setUbiquitous:YES

Application                       iCloud-monitored
               NSFileManager
 sandbox                              directory
Document storage

              setUbiquitous:YES

Application                       iCloud-monitored
               NSFileManager
 sandbox                              directory

              setUbiquitous:NO
Limitations
Limitations
1. Does not work on simulator
Limitations
1. Does not work on simulator
2. A provisioning profile and entitlements are needed to test
Limitations
1. Does not work on simulator
2. A provisioning profile and entitlements are needed to test
3. All files stored in iCloud must be managed by an object that
implements NSFilePresenter protocol
Limitations
1. Does not work on simulator
2. A provisioning profile and entitlements are needed to test
3. All files stored in iCloud must be managed by an object that
implements NSFilePresenter protocol
UIKit provides UIDocument class which implements
NSFilePresenter protocol
Be responsible!
Be responsible!
1. Don’t store any auto generated files in iCloud.
Be responsible!
1. Don’t store any auto generated files in iCloud.
2. Don’t keep any copies of files tracked by iCloud.
Be responsible!
1. Don’t store any auto generated files in iCloud.
2. Don’t keep any copies of files tracked by iCloud.
3. Be careful with large files. Space is limited.
Be responsible!
1. Don’t store any auto generated files in iCloud.
2. Don’t keep any copies of files tracked by iCloud.
3. Be careful with large files. Space is limited.
4. Key-value storage has a limit of 64kb.
Demo
Where to go from here?
Where to go from here?
Where to go from here?




http://www.raywenderlich.com/934/core-data-tutorial-getting-started
Where to go from here?




http://www.raywenderlich.com/934/core-data-tutorial-getting-started
          https://developer.apple.com/videos/wwdc/2011/
Where to go from here?




http://www.raywenderlich.com/934/core-data-tutorial-getting-started
          https://developer.apple.com/videos/wwdc/2011/
  http://developer.apple.com/library/mac/#documentation/cocoa/
               Conceptual/Archiving/Archiving.html
Thank you!
https://github.com/Tuszy/UserDefaultsSample
https://github.com/Tuszy/NSCacheSample
https://github.com/Tuszy/ArchivesSample
https://github.com/Tuszy/CoreDataSample
https://github.com/Tuszy/iCloudSample

              @srgtuszy
         srgtuszy@gmail.com
          srgtuszy.github.com

Data perisistance i_os

  • 1.
    Data Persistence iniOS Michał Tuszyński iOS/Android developer at appvetica @srgtuszy srgtuszy.github.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
    Roadmap 1. NSUserDefaults 2. NSCache 3.NSCoding protocol 4. CoreData
  • 7.
    Roadmap 1. NSUserDefaults 2. NSCache 3.NSCoding protocol 4. CoreData 5. iCloud
  • 8.
  • 9.
    What are NSUserDefaults? Key-value local storage, capable of storing both objects and primitive data types
  • 10.
    What should notbe stored in NSUserDefaults?
  • 11.
    What should notbe stored in NSUserDefaults? 1. Sensitive data
  • 12.
    What should notbe stored in NSUserDefaults? 1. Sensitive data 2. Heavy objects
  • 13.
    What should notbe stored in NSUserDefaults? 1. Sensitive data 2. Heavy objects 3. Big amounts of data
  • 14.
  • 15.
    What if Ineed a mechanism to cache big amount of objects?
  • 16.
    What if Ineed a mechanism to cache big amount of objects? ...use NSCache!
  • 17.
  • 18.
    Why NSCache? Similar apito NSMutableDictionary class
  • 19.
    Why NSCache? Similar apito NSMutableDictionary class - (void)setObject:(id)obj forKey:(id)key; - (void)removeObjectForKey:(id)key;
  • 20.
    Why NSCache? Why notjust use NSMutableDictionary then?
  • 21.
    Why NSCache? Why notjust use NSMutableDictionary then?
  • 22.
    Why NSCache? Why notjust use NSMutableDictionary then? - NSCache takes care of memory management
  • 23.
    Why NSCache? Why notjust use NSMutableDictionary then? - NSCache takes care of memory management - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num; - (void)setTotalCostLimit:(NSUInteger)lim;
  • 24.
    Why NSCache? Why notjust use NSMutableDictionary then? - NSCache takes care of memory management - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num; - (void)setTotalCostLimit:(NSUInteger)lim; - Will let you know when it disposes data (NSCacheDelegate)
  • 25.
    Why NSCache? Why notjust use NSMutableDictionary then? - NSCache takes care of memory management - (void)setObject:(id)obj forKey:(id)key cost:(NSUInteger)num; - (void)setTotalCostLimit:(NSUInteger)lim; - Will let you know when it disposes data (NSCacheDelegate) - (void)cache:(NSCache *)cache willEvictObject:(id)obj
  • 26.
  • 27.
    How to storecustom objects?
  • 28.
    How to storecustom objects? Using archives!
  • 29.
  • 30.
    What are archives? Archivesprovide a means to convert objects and values into architecture-independent stream of bytes
  • 31.
    What are archives? Archivesprovide a means to convert objects and values into architecture-independent stream of bytes Apple documentation
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
    Archives Keyed archives Sequential archives
  • 38.
    What is thedifference?
  • 39.
    What is thedifference?
  • 40.
    What is thedifference? Sequential archives
  • 41.
    What is thedifference? Sequential archives -Encoded from root object through all interrelated objects
  • 42.
    What is thedifference? Sequential archives -Encoded from root object through all interrelated objects -Must be decoded in the same order it was encoded
  • 43.
    What is thedifference? Sequential archives Keyed archives -Encoded from root object through all interrelated objects -Must be decoded in the same order it was encoded
  • 44.
    What is thedifference? Sequential archives Keyed archives -Encoded from root object -Each object is assigned a key through all interrelated objects -Must be decoded in the same order it was encoded
  • 45.
    What is thedifference? Sequential archives Keyed archives -Encoded from root object -Each object is assigned a key through all interrelated objects -Must be decoded in the same order it was encoded NSArchiver
  • 46.
    What is thedifference? Sequential archives Keyed archives -Encoded from root object -Each object is assigned a key through all interrelated objects -Must be decoded in the same order it was encoded NSArchiver NSKeyedArchiver
  • 47.
    How to createan archive out of a custom object?
  • 48.
    How to createan archive out of a custom object? 1.Implement NSCoding protocol inside the object
  • 49.
    How to createan archive out of a custom object? 1.Implement NSCoding protocol inside the object - (id)initWithCoder:(NSCoder *)decoder; - (void)encodeWithCoder:(NSCoder *)encoder;
  • 50.
    How to createan archive out of a custom object? 1.Implement NSCoding protocol inside the object - (id)initWithCoder:(NSCoder *)decoder; - (void)encodeWithCoder:(NSCoder *)encoder; 2. Use one of the NSCoder subclasses to get your archive
  • 51.
  • 53.
  • 54.
    CoreData is anefficient framework to manage your object persistence
  • 55.
    CoreData is anefficient framework to manage your object persistence Main features:
  • 56.
    CoreData is anefficient framework to manage your object persistence Main features: -Change tracking and undo support
  • 57.
    CoreData is anefficient framework to manage your object persistence Main features: -Change tracking and undo support -Relationship between entities maintenance
  • 58.
    CoreData is anefficient framework to manage your object persistence Main features: -Change tracking and undo support -Relationship between entities maintenance -Automatic validation of property values
  • 59.
    CoreData is anefficient framework to manage your object persistence Main features: -Change tracking and undo support -Relationship between entities maintenance -Automatic validation of property values -Low memory overhead (Faulting)
  • 60.
  • 61.
    What Core Datais not? -It is not a relational database
  • 62.
    What Core Datais not? -It is not a relational database -It’s not a silver bullet for your code
  • 63.
  • 64.
    How does itwork? Storage
  • 65.
    How does itwork? Storage
  • 66.
    How does itwork? Storage NSPersistentStoreCoordinator
  • 67.
    How does itwork? Storage The bridge between the storage NSPersistentStoreCoordinator and the application
  • 68.
    How does itwork? Storage The bridge between the storage NSPersistentStoreCoordinator and the application
  • 69.
    How does itwork? Storage NSManagedObjectModel The bridge between the storage NSPersistentStoreCoordinator and the application
  • 70.
    How does itwork? Storage NSManagedObjectModel A collection of data models which are used in the application The bridge between the storage NSPersistentStoreCoordinator and the application
  • 71.
    How does itwork? Storage NSManagedObjectModel A collection of data models which are used in the application The bridge between the storage NSPersistentStoreCoordinator and the application
  • 72.
    How does itwork? Storage NSManagedObjectModel A collection of data models which are used in the application The bridge between the storage NSPersistentStoreCoordinator and the application NSManagedObjectContext
  • 73.
    How does itwork? Storage NSManagedObjectModel A collection of data models which are used in the application The bridge between the storage NSPersistentStoreCoordinator and the application Scratchpad which communicates with NSManagedObjectContext NSPersistentStoreCoordinator to save changes
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object
  • 80.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data
  • 81.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data Can be created using following ways:
  • 82.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data Can be created using following ways: 1. Designated initializer
  • 83.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data Can be created using following ways: 1. Designated initializer - (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext: (NSManagedObjectContext *)context
  • 84.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data Can be created using following ways: 1. Designated initializer - (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext: (NSManagedObjectContext *)context 2. Static method of NSEntityDescription class
  • 85.
    NSManagedObject - Generic classthat implements all basic behavior required by CoreData model object - It’s not possible to use regular NSObjects with Core Data Can be created using following ways: 1. Designated initializer - (id)initWithEntity:(NSEntityDescription *)entity insertIntoManagedObjectContext: (NSManagedObjectContext *)context 2. Static method of NSEntityDescription class + (id)insertNewObjectForEntityForName:(NSString *)entityName inManagedObjectContext: (NSManagedObjectContext *)context
  • 86.
    Create NSManagedObjects torepresent your data model NSManagedObject NSManagedObject NSManagedObject
  • 87.
    NSManagedObjects are heldin NSManagedObjectContext’s cache NSManagedObject NSManagedObject NSManagedObject
  • 88.
    NSManagedObjects are heldin NSManagedObjectContext’s cache NSManagedObject NSManagedObject NSManagedObject
  • 89.
    NSManagedObjects are heldin NSManagedObjectContext’s cache NSManagedObject NSManagedObject NSManagedObjectContext NSManagedObject
  • 90.
    NSManagedObjects are heldin NSManagedObjectContext’s cache NSManagedObject NSManagedObject NSManagedObjectContext NSManagedObject
  • 91.
    NSManagedObjects are heldin NSManagedObjectContext’s cache NSManagedObject NSManagedObject NSManagedObjectContext NSManagedObject Save
  • 92.
  • 94.
  • 95.
    Why should youuse iCloud APIs?
  • 96.
    Why should youuse iCloud APIs? 1. There’s no need to configure and maintain servers
  • 97.
    Why should youuse iCloud APIs? 1. There’s no need to configure and maintain servers 2. Syncs across all devices without your effort
  • 98.
    Why should youuse iCloud APIs? 1. There’s no need to configure and maintain servers 2. Syncs across all devices without your effort 3. Autosaving and conflict resolving
  • 99.
    Why should youuse iCloud APIs? 1. There’s no need to configure and maintain servers 2. Syncs across all devices without your effort 3. Autosaving and conflict resolving 4. Easily revert to a previous version
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
    iCloud Document storage Key-value storage
  • 105.
    Document storage Application sandbox
  • 106.
  • 107.
    Document storage Application iCloud-monitored sandbox directory
  • 108.
    Document storage Application iCloud-monitored NSFileManager sandbox directory
  • 109.
    Document storage Application iCloud-monitored NSFileManager sandbox directory
  • 110.
    Document storage setUbiquitous:YES Application iCloud-monitored NSFileManager sandbox directory
  • 111.
    Document storage setUbiquitous:YES Application iCloud-monitored NSFileManager sandbox directory
  • 112.
    Document storage setUbiquitous:YES Application iCloud-monitored NSFileManager sandbox directory setUbiquitous:NO
  • 113.
  • 114.
    Limitations 1. Does notwork on simulator
  • 115.
    Limitations 1. Does notwork on simulator 2. A provisioning profile and entitlements are needed to test
  • 116.
    Limitations 1. Does notwork on simulator 2. A provisioning profile and entitlements are needed to test 3. All files stored in iCloud must be managed by an object that implements NSFilePresenter protocol
  • 117.
    Limitations 1. Does notwork on simulator 2. A provisioning profile and entitlements are needed to test 3. All files stored in iCloud must be managed by an object that implements NSFilePresenter protocol UIKit provides UIDocument class which implements NSFilePresenter protocol
  • 118.
  • 119.
    Be responsible! 1. Don’tstore any auto generated files in iCloud.
  • 120.
    Be responsible! 1. Don’tstore any auto generated files in iCloud. 2. Don’t keep any copies of files tracked by iCloud.
  • 121.
    Be responsible! 1. Don’tstore any auto generated files in iCloud. 2. Don’t keep any copies of files tracked by iCloud. 3. Be careful with large files. Space is limited.
  • 122.
    Be responsible! 1. Don’tstore any auto generated files in iCloud. 2. Don’t keep any copies of files tracked by iCloud. 3. Be careful with large files. Space is limited. 4. Key-value storage has a limit of 64kb.
  • 123.
  • 124.
    Where to gofrom here?
  • 125.
    Where to gofrom here?
  • 126.
    Where to gofrom here? http://www.raywenderlich.com/934/core-data-tutorial-getting-started
  • 127.
    Where to gofrom here? http://www.raywenderlich.com/934/core-data-tutorial-getting-started https://developer.apple.com/videos/wwdc/2011/
  • 128.
    Where to gofrom here? http://www.raywenderlich.com/934/core-data-tutorial-getting-started https://developer.apple.com/videos/wwdc/2011/ http://developer.apple.com/library/mac/#documentation/cocoa/ Conceptual/Archiving/Archiving.html
  • 129.