Latest 1.0
Homepage https://github.com/couchbaselabs/TouchDB-iOS
License Apache Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Platforms ios 5.0
Dependencies CocoaHTTPServer, MYUtilities, JSONKit
Frameworks SystemConfiguration
Authors

by Jens Alfke ([email protected])
with contributions from Alexander Edge, Chris Kau, David Venable, Derek Clarkson, Fabien Franzen, fcandalija, J Chris Anderson, Marty Schoch, Mike Lamb, Paul Mietz Egli, Robin Lu
and technical advice from Damien Katz and Filipe Manana

IMPORTANT-LOOKING NOTICE

TouchDB is the legacy 1.0 version of the project now named Couchbase Lite. Due to the renaming and architectural changes, Couchbase Lite lives in a separate repository (although it inherits from TouchDB.) We don’t recommend using TouchDB for any new development: Couchbase Lite is faster, easier to use, has a better API, has a lot of new features including full-text search and geo-queries, and is actively being developed and supported.

Please proceed to Couchbase Lite. Thanks! –Jens & the Couchbase Mobile team

END OF IMPORTANT-LOOKING NOTICE

.

.

.

.

TouchDB is a lightweight Apache CouchDB-compatible database engine suitable for embedding into mobile or desktop apps. Think of it this way: If CouchDB is MySQL, then TouchDB is SQLite.

By "CouchDB-compatible" I mean that it can replicate with CouchDB, and that its data model and high-level design are "Couch-like" enough to make it familiar to CouchDB/Couchbase developers. Its REST API is nearly identical, though it doesn’t support a few CouchDB features, like user accounts, that aren’t useful in mobile apps. Its implementation is not based on CouchDB’s (it’s not even written in Erlang.) It does support replication to and from CouchDB.

By "suitable for embedding into mobile apps", I mean that it meets the following requirements:

  • Small code size; currently about 350kbytes of ARM7 code. (Code size is important to mobile apps, which are often downloaded over cell networks.)
  • Quick startup time on relatively-slow CPUs; ideally 100ms or less.
  • Low memory usage with typical mobile data-sets. The expectation is the number of documents will not be huge, although there may be sizable multimedia attachments.
  • "Good enough" performance with these CPUs and data-sets.

And by "mobile apps" we’re focusing on iOS and Android, although there’s no reason we couldn’t extend this to other platforms like Windows Phone. And it’s not limited to mobile OSs — the Objective-C implementation runs on Mac OS as well, and on Linux and other Unix-like OSs via GNUstep.

More Information

  • There’s lots more information on the wiki.
  • There’s a "Grocery Sync" demo app for iOS, that implements a simple shared to-do list.
  • Or if you want to ask questions or get help, join the mailing list.

Platforms

  • Mac OS X — 10.7.2 or higher.
  • iOS — 5.0 or higher.
  • Linux, BSD, etc — Any platform supported by current GNUstep and libobjc2.
  • MS Windows — As supported by GNUstep using MingW.
  • Android / Java — Has its own source base and repository.

Requirements

  • It’s written in Objective-C.
  • Xcode 4.5+ is required to build it (Clang 3.1+, with GNUstep).
  • Runtime system requirements for Apple platforms are iOS 5+, or Mac OS X 10.7.2+.

License

  • TouchDB itself is under the Apache License 2.0.
  • FMDB, by Gus Mueller, is under the MIT License.
  • Google Toolbox For Mac is under the Apache License 2.0.
  • CocoaHTTPServer, by Robbie Hanson, is under the BSD License.
  • MYUtilities (portions of which are copied into the vendor/MYUtilities directory) is under the BSD License. (But note that I, Jens, wrote MYUtilities and would have no problem re-licensing it under Apache for use here.)

Development Status

TouchDB 1.0.1 was released on January 15, 2013; there have been various bug fixes since then. Use the latest revision on the default ‘master’ branch.

TouchDB has not been actively developed since Spring 2013. It’s not recommended for new projects.

Building TouchDB

On a Mac

(You might prefer to just download the latest stable release. But if you want to build it yourself…)

For full details see the wiki page. The basic steps are:

  1. Clone the TouchDB repository to your local disk.
  2. In that directory run "git submodule init" and then "git submodule update". This will clone the dependent library repos (such as FMDB and MYUtilities) into the vendor/ subdirectory.
  3. Open the Xcode project and build the "Mac Framework" and/or "iOS Framework" schemes.

With GNUstep

Please refer to the files BUILDING.txt and SETUP.txt in the GNUstep directory.

Latest podspec

{
    "name": "TouchDB",
    "version": "1.0",
    "license": {
        "type": "Apache",
        "text": "   Licensed under the Apache License, Version 2.0 (the "License");n   you may not use this file except in compliance with the License.n   You may obtain a copy of the License atnn       http://www.apache.org/licenses/LICENSE-2.0nn   Unless required by applicable law or agreed to in writing, softwaren   distributed under the License is distributed on an "AS IS" BASIS,n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.n   See the License for the specific language governing permissions andn   limitations under the License.n"
    },
    "summary": "CouchDB-compatible mobile database; Objective-C version.",
    "homepage": "https://github.com/couchbaselabs/TouchDB-iOS",
    "authors": {
        "Jens Alfke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/couchbaselabs/TouchDB-iOS.git",
        "tag": "v1.0",
        "submodules": "true"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": [
        "Source/**/*.{h,m}",
        "vendor/oauthconsumer/**/*.{h,m,c}",
        "vendor/fmdb/src/**/*.{h,m}"
    ],
    "exclude_files": [
        "Source/*GNUstep.{h,m}",
        "Source/*_Tests.{h,m}",
        "vendor/oauthconsumer/OAHMAC_SHA1SignatureProvider.{m}"
    ],
    "header_dir": "TouchDB",
    "dependencies": {
        "CocoaHTTPServer": [],
        "MYUtilities": [],
        "JSONKit": []
    },
    "frameworks": "SystemConfiguration",
    "libraries": "sqlite3",
    "requires_arc": false,
    "prepare_command": "echo "This Pod relies on the removed \`pre_install\` or \`post_install\` hooks and therefore will no longer continue to work. Please try updating to the latest version of this Pod or updating the Pod specification. See http://blog.cocoapods.org/CocoaPods-Trunk/ for more details." && exit 1"
}

Pin It on Pinterest

Share This