(スウィフト)答えは
let properties = [
"type": "person",
"name": "frank",
"created_at": "some timestamp"
]
let doc = database.createDocument()
do {
return try doc.putProperties(properties)
} catch let error as NSError {
handleError(error)
return nil
}
またはOBJ-C
NSDictionary* properties = @{@"type": @"person",
@"name": @"frank",
@"created_at": @"some timestamp"};
CBLDocument* doc = [database createDocument];
NSError* error;
if (![doc putProperties: properties error: &error]) {
[self handleError: error];
}
ガイドはかなり良いですけれども、あなたを歩きます多くの始まりのプロセス。
Using the Database
出典
2016-09-16 16:58:16
Jay
この言語を実装しようとしていますか? [docs](http://developer.couchbase.com/documentation/mobile/1.3/develop/guides/couchbase-lite/native-api/document/index.html)が役に立つかもしれません。 – Kyriakos
@Kyriakos Objective C :) –
あなたのスクリーンショットは、Couchbase Serverコンソールを表示するように見えます。これはiOS向けのCouchbase Liteとはまったく異なります。 Kyriakosのリンク先のdocsを見たり、[here](http://developer.couchbase.com/mobile/)を起動してみてください。また、元の投稿を編集して実際のメールアドレスのように見えるようにすることもできます。 – Hod