I’m trying to temporarily turn on replicators during a push notification. Inside
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
I have tried this:
CBLManager *manager = [CBLManager sharedInstance];
for (NSString* name in [manager allDatabaseNames]) {
CBLDatabase* db = [manager databaseNamed:name error:nil];
NSArray* replications = [db allReplications];
for(CBLReplication* rep in replications) {
rep.suspended = false;
}
}
But the list of replications
returned by CBLDatabase allReplications
is empty. I do have 2 replication process running. Any idea how can I get access to them?