Skip to content

ParcelKit integrates Core Data with Dropbox using the Dropbox Datastore API

License

Notifications You must be signed in to change notification settings

overcommitted/ParcelKit

Repository files navigation

ParcelKit Build Status

ParcelKit integrates Core Data with Dropbox using the Dropbox Datastore API.

Installation

ParcelKit can be added to a project using CocoaPods. We also distribute a framework build.

Using CocoaPods Badge w/ Version

// Podfile
pod 'ParcelKit', '~> 2.1'

and

pod install

Framework

  1. Open the ParcelKit.xcodeproj project
  2. Select the “Framework” scheme
  3. Build (⌘B) the Framework
  4. Open the Products section in Xcode, right click “libParcelKit.a”, and select “Show in Finder”
  5. Drag and drop the “ParcelKit.framework” folder into your iPhone/iPad project
  6. Edit your build settings and add -ObjC to “Other Linker Flags”

Usage

Include ParcelKit in your application.

#import <ParcelKit/ParcelKit.h>

Initialize an instance of the ParcelKit sync manager with the Core Data managed object context and the Dropbox data store that should be used for listening for changes from and writing changes to.

PKSyncManager *syncManager = [[PKSyncManager alloc] initWithManagedObjectContext:self.managedObjectContext datastore:self.datastore];

Associate the Core Data entity names with the corresponding Dropbox data store tables.

[syncManager setTable:@"books" forEntityName:@"Book"];

Start observing changes from Core Data and Dropbox.

[syncManager startObserving];

Hold on to the sync manager reference.

self.syncManager = syncManager;

Set up Core Data

ParcelKit requires an extra attribute inside your Core Data model.

  • syncID with the type String. The Indexed property should also be checked.

Make sure you add this attribute to each entity you wish to sync.

An alternative attribute name may be specifed by changing the syncAttributeName property on the sync manager object.

Documentation

Example Application

  • Toado - Simple task manager demonstrating the integration of Core Data and Dropbox using ParcelKit.

Requirements

  • iOS 6.1 or higher
  • Dropbox Sync SDK 3.1.0 or higher
  • Xcode 5 or higher

License

MIT.

About

ParcelKit integrates Core Data with Dropbox using the Dropbox Datastore API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages