Skip to content

Core Data Persistence with Parse, an NSIncrementalStore subclass.

License

Notifications You must be signed in to change notification settings

Alydyn/PFIncrementalStore

 
 

Repository files navigation

PFIncrementalStore

Build Status Stories in Ready

An NSIncrementalStore subclass for Parse

PFIncrementalStore is an NSIncrementalStore subclass that uses Parse to automatically request resources as properties and relationships are needed.

Incremental Store Persistence

PFIncrementalStore does not persist data directly. Instead, it manages a persistent store coordinator that can be configured to communicate with any number of persistent stores of your choice.

NSURL *storeURL = [[self applicationDocumentsDirectory]
URLByAppendingPathComponent:@"BasicExample.sqlite"];
NSDictionary *options = @{ NSInferMappingModelAutomaticallyOption :
@(YES) };

NSError *error = nil;
if (![incrementalStore.backingPersistentStoreCoordinator
addPersistentStoreWithType:NSSQLiteStoreType configuration:nil
URL:storeURL options:options error:&error]) {
    NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
    abort();
}

If your data set is of a more fixed or ephemeral nature, you may want to use NSInMemoryStoreType.

Requirements

PFIncrementalStore requires a subscription to Parse, a valid Parse App, API Key and Secret, and minor programming knowledge. Parse subscription and API information can be obtained at https://www.parse.com/

PFIncrementalStore requires Xcode 4.4 with the iOS 5.0 SDK, as well as Parse 1.2 or higher.

Installation

CocoaPods is the recommended way to add PFIncrementalStore to your project.

Here's an example podfile that installs PFIncrementalStore and its dependency, Parse:

Podfile

platform :ios, '5.0'

pod 'PFIncrementalStore'

Note the specification of iOS 5.0 as the platform; leaving out the 5.0 will cause CocoaPods to fail with the following message:

[!] PFIncrementalStore is not compatible with iOS 4.3.

References

Apple has recently updated their programming guide for NSIncrementalStore, which is available from the Developer Center. You may find this useful in debugging the behavior of PFIncrementalStore, and its interactions with your app's Core Data stack.

Credits

PFIncrementalStore was created by Scott BonAmi.

Creators

Scott BonAmi
@snb828

Disclaimer

PFIncrementalStore is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Parse.com, Parse Inc., or any of its subsidiaries or its affiliates. The official Parse web site is available at www.parse.com.

License

PFIncrementalStore is available under the MIT license. See the LICENSE file for more info.

About

Core Data Persistence with Parse, an NSIncrementalStore subclass.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 90.4%
  • C 7.7%
  • Ruby 1.9%