ParcelKit integrates Core Data with Dropbox using the Dropbox Datastore API
Objective-C Other
Latest commit 567ab15 Apr 10, 2015 @daikini daikini Merge pull request #27 from andygeers/validate_inserts
Don't let invalid records prevent the MOC from being saved
Permalink
Failed to load latest commit information.
Documentation/html Update documentation Oct 23, 2013
ParcelKit.xcodeproj Use syncedPropertiesDictionary when syncing Sep 23, 2014
ParcelKit Make some tweaks after code review Apr 9, 2015
ParcelKitTests
Vendor/Dropbox/Dropbox.framework Updated Dropbox-Sync-API-SDK to 3.1.1 Oct 23, 2014
.gitignore Initial Checkin Jul 18, 2013
.travis.yml Remove travis workaround for updating xctool Jul 22, 2014
CHANGELOG.md Updated Dropbox-Sync-API-SDK to 3.1.2 Jan 29, 2015
LICENSE Initial Checkin Jul 18, 2013
ParcelKit.podspec Updated Dropbox-Sync-API-SDK to 3.1.2 Jan 29, 2015
ParcelKitAttribute.png Renamed syncId to syncID to match common naming conventions Jul 20, 2013
ParcelKitLogo.png Updated the readme to include a logo, installation instructions and r… Jul 18, 2013
README.md Update README Sep 23, 2014
Rakefile Initial Checkin Jul 18, 2013

README.md

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.