Strangely I also noticed that even when the app is running in the 
foreground that method always returns and empty array. 


On Friday, 19 August 2016 13:27:48 UTC+1, Nick Pomfret wrote:
>
>  The replicators were created using the REST api (from a react-native 
> app).  I want to resume them so tried writing a bit of objective-c to do it 
> as there doesn't seem to be a way using the REST API.
>
>
> /**
>  * [email protected]
>  * http://twitter.com/nickpomfret
>  * https://uk.linkedin.com/in/nick-pomfret-03614a
>  */
>  
>
> On 19 August 2016 at 13:17, James Nocentini <[email protected]> 
> wrote:
>
>> [db allReplications] returns all the running replications so it will be 
>> empty when there are no replications running. Did you try to use [database 
>> createPush/PullReplication:] to resume it? The replication will pick up 
>> from where it last stopped.
>>
>> James
>>
>> On Friday, 19 August 2016 11:38:40 UTC+1, Nick Pomfret wrote:
>>>
>>> I tried a basic brute force approach and just try and turn them all on:
>>>
>>>   CBLManager *manager = [CBLManager sharedInstance];
>>>
>>>   NSArray* dbNames = [manager allDatabaseNames];
>>>
>>>   for (id name in dbNames) {
>>>
>>>     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 the call to allReplications is 
>>> empty.
>>>
>>> On Friday, 19 August 2016 10:57:26 UTC+1, Nick Pomfret wrote:
>>>>
>>>> Sorry, I'm struggling with this a bit (not a iOS programmer!).  I have 
>>>> a method in my AppDelegate
>>>>
>>>> -(void)application:(UIApplication *)application 
>>>> didReceiveRemoteNotification:(NSDictionary *)notification 
>>>> fetchCompletionHandler:(void 
>>>> (^)(UIBackgroundFetchResult))completionHandler 
>>>> {
>>>>
>>>> in which I'd like to switch on the replicator temporarily.  But I don't 
>>>> know how to get access to it in order to switch it on.
>>>>
>>>> On Monday, 20 June 2016 13:32:15 UTC+1, Nick Pomfret wrote:
>>>>>
>>>>> I'm trying to get couchbase lite (on iOS for now) to sync documents 
>>>>> when its awoken in the background from a push notification.  So far I can 
>>>>> accept and process a notification while the app is in the background.  
>>>>> And 
>>>>> I have given it 10 seconds before the completionHandler gets called.  
>>>>> But during that 10 seconds I can't see any activity.
>>>>>
>>>>> Any pointers on what I've missed would be appreciated. 
>>>>>
>>>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Couchbase Mobile" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/mobile-couchbase/EOkrycvMnas/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/mobile-couchbase/783cd947-3f74-4926-b3ef-100dc24342dd%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/mobile-couchbase/783cd947-3f74-4926-b3ef-100dc24342dd%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/a4f56816-2614-4ad3-bd07-83041bf58ceb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to