couchbaselabs / ToDoLite-iOS

To-Do list sample app for Couchbase Lite, native iOS version
85 stars 41 forks source link

**This repository is in the process of being deprecated. See the Swift TODO app in the training documentation for a more up-to-date sample.

ToDo Lite for iOS

This is a demo app showing how to use the Couchbase Lite framework to embed a nonrelational ("NoSQL") document-oriented database in an iOS app and sync it with Couchbase Server in "the cloud".

screenshot

The app is a simple shared to-do list manager. Users can create multiple lists, each with its own items that can be checked off when done. Lists are private by default but can be shared with other users (which is very useful if your housemate is halfway to the grocery store when you remember you're out of pasta.)

You can download a pre-buit version from the iTunes App Store.

TodoLite for the PhoneGap and Android platforms are also available.

Benefits of Couchbase Lite

What does Couchbase Lite bring to the table?

Building & Running The Demo App

Down to business: You should be familiar with how to build and run an iOS app. And you'll need a copy of Xcode version 6 or later.

If you have questions or get stuck or just want to say hi, please visit the Mobile Couchbase group on Google Groups.

  1. Clone or download this repository.
  2. Download Couchbase Lite 1.1 or later, or check out and build it yourself.
  3. Copy CouchbaseLite.framework into the Frameworks directory of this repo.
  4. Open ToDoList.xcodeproj.
  5. Select the "ToDoLite" scheme and the appropriate destination (simulator or attached iOS device) from the pop-up menu in the Xcode toolbar.
  6. Click the Run button

That's it! Now that you're set up, you can just use the Run command again after making changes to the demo code.

Quick modifications you might want to make.

In the AppDelegate.m file, there is a constant defined kSyncGatewayUrl -- by default when you log into the app via Facebook, it will sync with this test database hosted by Couchbase. If you deploy your own Sync Gateway, you will probably want to change this URL to point at your server.

If you run your own Sync Gateway, the sync function source code we use is available in the sync-gateway-config.json file in the root of this repository.

To add the framework to your existing Xcode project

Please see the documentation for Couchbase Lite.

License

Released under the Apache license, 2.0.

Copyright 2011-2016, Couchbase, Inc.