I'm trying a workaround for now, which is to fire off a one-shot
(non-continuous) replication when a push notification is received.  But its
not working either, my method:

...{
        // copied from
http://developer.couchbase.com/documentation/mobile/current/develop/guides/couchbase-lite/native-api/replication/index.html

    CBLManager *manager = [CBLManager sharedInstance];

    CBLDatabase* database = [manager databaseNamed:dbName error:nil];


    CBLReplication* pull = [database createPullReplication:syncURL];

    CBLReplication* push = [database createPushReplication:syncURL];



    id<CBLAuthenticator> auth = [CBLAuthenticator basicAuthenticatorWithName:
userId password: password];

    push.authenticator = pull.authenticator = auth;


    [pull start];

    [push start];
}

is blowing up when it reaches createPullReplication:syncURL it fails with:

*Exception '-[__NSCFString user]: unrecognized selector sent to instance
0x148a7db20' was thrown while invoking startReplication on target
ReactCBLite with params (*

*    "http://192.168.1.185:4984/sync_gateway
<http://192.168.1.185:4984/sync_gateway>",*

*    "pc_macmini_0_9133f13f-c7d9-41ae-a09f-37cdf906160b",*

*    "9133f13f-c7d9-41ae-a09f-37cdf906160b",*

*    "9fe7d83b-f6b7-4632-b293-a77356b76655"*

*)*

And doesn't even get as far as the 'auth' line.  Any ideas?




/**
 * [email protected]
 * http://twitter.com/nickpomfret
 * https://uk.linkedin.com/in/nick-pomfret-03614a
 */


On 19 August 2016 at 15:00, Nick Pomfret <[email protected]> wrote:

> Thanks Jens.  This would be a life saver.
>
> https://github.com/couchbase/couchbase-lite-ios/issues/1410
>
>
>
> /**
>  * [email protected]
>  * http://twitter.com/nickpomfret
>  * https://uk.linkedin.com/in/nick-pomfret-03614a
>  */
>
>
> On 19 August 2016 at 14:44, Jens Alfke <[email protected]> wrote:
>
>>
>> On Aug 19, 2016, at 8:27 AM, Nick Pomfret <[email protected]>
>> 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.
>>
>>
>> The implementation of the REST API doesn’t create CBLReplication objects
>> — it calls into the lower level internal replicator class (CBL_Replicator).
>> That means the public Obj-C API won’t see replications created by the REST
>> API.
>>
>> That doesn’t sound like a great design, now that I write it down like
>> this, but it’s never come up as a problem before … :-/
>>
>> I think we’ll need to add something to the REST API to allow you to
>> unsuspend replications. Is there an issue covering this?
>>
>> —Jens
>>
>> --
>> 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/to
>> pic/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/ms
>> gid/mobile-couchbase/7A1A53B6-B73A-4316-8D25-3DF9FA46BA83%40couchbase.com
>> <https://groups.google.com/d/msgid/mobile-couchbase/7A1A53B6-B73A-4316-8D25-3DF9FA46BA83%40couchbase.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/CACfBfNuPBkZMtuXrtT4Aik7vM5fTMYQtAFwsge8gHQB8i%2B-tuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to