2016-09-12 11 views
-1

CouchbaseのiOS実装で新しい文書を作成する方法を知っている人は誰ですか?Couchbaseで新しい文書を作成するには?

ステップ1:ドキュメント

何次のステップを作成します:Couchbaseのバケット ステップ2を作成しますか?

添付してください。

Couchbase Buckets

Create Document

私は追加したいドキュメントをご覧ください: スクリーンショット、

[User]

[Information]

[Filter]を次の

[Chat]

[Broadcast]

[Notification]

[Comments]

[Blocked_user]

[Location]

[Like]

[Reach]

+0

この言語を実装しようとしていますか? [docs](http://developer.couchbase.com/documentation/mobile/1.3/develop/guides/couchbase-lite/native-api/document/index.html)が役に立つかもしれません。 – Kyriakos

+0

@Kyriakos Objective C :) –

+0

あなたのスクリーンショットは、Couchbase Serverコンソールを表示するように見えます。これはiOS向けのCouchbase Liteとはまったく異なります。 Kyriakosのリンク先のdocsを見たり、[here](http://developer.couchbase.com/mobile/)を起動してみてください。また、元の投稿を編集して実際のメールアドレスのように見えるようにすることもできます。 – Hod

答えて

0

(スウィフト)答えは

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

関連する問題