Giter Site home page Giter Site logo

todolite-phonegap's Introduction

Todo Lite

A shared todo list application to demonstrate the features of Couchbase Lite.

Install

To run this application, you'll need the Xcode developer package, or the Android SDK, and the PhoneGap toolchain.

First create an empty PhoneGap app container using the PhoneGap npm package.

npm install -g phonegap
phonegap create todo-lite com.couchbase.TodoLite TodoLite
cd todo-lite

Now install the PhoneGap plugins required to make it run. This activates Couchbase Lite, the camera, and the InAppBrowser.

phonegap local plugin add https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
phonegap local plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git

Now replace the generated application with the Todo Lite source code.

rm -rf www
git clone https://github.com/couchbaselabs/TodoLite-PhoneGap.git www

That's it, now you are ready to run the app:

phonegap run ios

or

phonegap run android

This will launch the app in your iOS or Android Simulator. If you want to launch the app on an iOS device, open the project in Xcode. From the project directory, you can run:

open platforms/ios/TodoLite.xcodeproj/

Do note that the Xcode project is only updated by the phonegap command line tool, so you must run phonegap run ios or phonegap build ios before it will pick up any changes made in the www directory.

Running your own Sync Gateway server

In www/js/index.js there is a value for syncUrl which is set to a remote server hosted by Couchbase as a convenience. You can easily provision your own server either by running your own instance of Couchbase Sync Gateway or by creating a server in the experimental Couchbase cloud.

If you are running your own server, launch it by pointing it at the sync-gateway-config.json that is shipped as part of this repository. If you are launching a Sync Gateway instance in the cloud, the only configuration you'll need to provide is to copy the sync function from that JSON file into the web UI.

Release Notes / TODO

  • Currently support for Android is limited by a few minor API compatiblity issues. These are probably fixed by the time you are reading this.
  • Redraw flash should be avoided. This is especially apparent on long lists.
  • Lists are too wide in portrait mode on iPad
  • The app won't detect if you get logged out (cookie expires) -- need testing.

Community

If you got this far, please join our mailing list and let us know how it went. Or just send a tweet.

todolite-phonegap's People

Contributors

tleyden avatar deefactorial avatar

Watchers

James Cloos avatar Patrick Njuguna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.