Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@property (nonatomic, strong) CBLLiveQuery *liveQuery;
AppDelegate *ap = ApplicationDelegate;
self.liveQuery = [[ap.database queryAllDocuments] asLiveQuery];
[self.liveQuery addObserver:self forKeyPath:@"rows" options:0 context:NULL];
- (void) observeValueForKeyPath:(NSString *)keyPath
change:(NSDictionary *)change
context:(void *)context
if (object == self.liveQuery) {
NSLog(@"live query”);
// ライブクエリ時の処理をここに書く
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment