public void Can_set_and_retrieve_string_by_key() { var record = new CKRecord("record_type"); var stringKey = "string_key"; var stringValue = "string_value"; record.SetString(stringValue, stringKey); Assert.AreEqual(record.StringForKey(stringKey), stringValue); }
private void OnRecordFetched(CKRecord record, NSError error) { if (error != null) { Debug.LogError("Could not fetch record: " + error.LocalizedDescription); } else { Debug.Log(string.Format("Record fetched. Greeting is {0}", record.StringForKey("Greeting"))); } database.DeleteRecordWithID(record.RecordID, OnRecordDeleted); }
private void OnRecordModified(CKRecord record, NSError error) { if (error != null) { Debug.LogError(error.LocalizedDescription); } else { // Retrieve values you set using the "Object"ForKey methods... Debug.Log(string.Format("record '{0}' MyNumber is:{1}", record.RecordID.RecordName, record.StringForKey("MyField"))); // Notice the record change tag has changed after you modification Debug.Log("RecordChangeTag: " + record.RecordChangeTag); database.DeleteRecordWithID(record.RecordID, OnRecordDeleted); } }