passing commandline arg to phonegap app

2014-03-18 Thread Seung Chan Lim
Hello,

I'm trying to pass:

-Log YES -LogSync YES

as command line arguments to:

phonegap run ios --emulator

Does anyone know how I can do such a thing?

Thanks in advance,

slim

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/7cc4605e-b36d-4f5f-8a08-b79666891970%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
It doesn't work. When I hit the square "home" button on my iPhone to put 
the app in the background, then hit the app icon to bring it to the 
foreground replication has stopped working.

I don't know how to pass command line args to phonegap. Let me ask the 
group.

slim

On Tuesday, March 18, 2014 8:06:27 PM UTC-4, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 4:45 PM, Seung Chan Lim > 
> wrote:
>
> When you say on/offline you mean if the network goes on/offline? I was 
> referring to the application going foreground/background.
>
>
> Oh, OK. That's supported too. The replicator will stop when the app goes 
> into the background and resume when it returns to the foreground. Not sure 
> why this wouldn't be working for you.
>
> Does PhoneGap allow you to add command-line args when launching your app? 
> If so, add args "-Log YES -LogSync YES". Then you'll get logging about 
> what's going on during sync. You should see messages about "Reachability 
> state", including "suspended=1" on background and "suspended=0" when 
> foregrounded.
>
> —Jens
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/360def0d-809e-42e9-816b-6107b8b997cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 4:45 PM, Seung Chan Lim  wrote:

> When you say on/offline you mean if the network goes on/offline? I was 
> referring to the application going foreground/background.

Oh, OK. That's supported too. The replicator will stop when the app goes into 
the background and resume when it returns to the foreground. Not sure why this 
wouldn't be working for you.

Does PhoneGap allow you to add command-line args when launching your app? If 
so, add args "-Log YES -LogSync YES". Then you'll get logging about what's 
going on during sync. You should see messages about "Reachability state", 
including "suspended=1" on background and "suspended=0" when foregrounded.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/9FEACA03-BC2A-49DA-9D0F-41D5ADB28A03%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
On iOS using phonegap.

When you say on/offline you mean if the network goes on/offline? I was 
referring to the application going foreground/background.

slim

On Tuesday, March 18, 2014 2:04:31 PM UTC-4, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 10:42 AM, Seung Chan Lim > 
> wrote:
>
> Ah... I figured it out. It seems to have to do with the fact that 
> replication stops when the app goes into PAUSE event and doesn't restart 
> when it goes into RESUME event.
>
>
> Are you talking about Android specifically? (Please be specific about 
> platforms when you ask questions.)
>
> I know that the Couchbase Lite on Android doesn’t yet have support for 
> going on/offline, so you’ll need to restart the replication as a 
> workaround. (Or so I believe; Traun is the expert.)
>
> —Jens
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/93f5cb4b-b0a8-47a9-8b92-8638b460c20d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: P2P connection silly question

2014-03-18 Thread Sandra
Ok, let me study that. Thanks a lot!

On Tuesday, March 18, 2014 3:34:57 PM UTC-6, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 12:59 PM, Sandra > 
> wrote: 
>
> > One more question, where do I get the netService.HostName and port? 
> > NSString *peerDB = [NSString 
> stringWithFormat:@"http://%@:%@@%@:%d/mydb/",@"naomi",@"letmein",netService.hostName,netService.port];
>  
>
>
> Here "netService" is the peer that your NSNetServiceBrowser discovered. 
> The code you quoted is probably intended to be called from the browser 
> delegate method 
>
> - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser 
> didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing; 
>
> If you're not familiar with Bonjour and NSNetService, you should look at 
> Apple's sample code like PictureSharing. It'd definitely be best to 
> experiment with it and understand how it works, before trying to integrate 
> it with Couchbase Lite. 
>
> —Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/95ac2fe0-70b9-4860-b2e2-940b991a6fe7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: P2P connection silly question

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 12:59 PM, Sandra  wrote:

> One more question, where do I get the netService.HostName and port?
> NSString *peerDB = [NSString 
> stringWithFormat:@"http://%@:%@@%@:%d/mydb/",@"naomi",@"letmein",netService.hostName,netService.port];

Here "netService" is the peer that your NSNetServiceBrowser discovered. The 
code you quoted is probably intended to be called from the browser delegate 
method

- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser 
didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing;

If you're not familiar with Bonjour and NSNetService, you should look at 
Apple's sample code like PictureSharing. It'd definitely be best to experiment 
with it and understand how it works, before trying to integrate it with 
Couchbase Lite.

—Jens

smime.p7s
Description: S/MIME cryptographic signature


FYI: Disabling WebSockets in pull replication (if you need to)

2014-03-18 Thread Jens Alfke
One of the new features in iOS beta 3 is the use of WebSockets for the "changes 
feed" that sends change notifications from the server to the pull replication. 
This is more efficient than the "long-poll" mechanism that we used to use. But 
it's a bunch of new code on both client and server, and there may be bugs in it.

If you're upgrading to beta 3 and finding new problems with pull replications, 
you can try disabling WebSockets and see if that helps. To do so, just add a 
line like this after creating your pull replication:
pullRepl.customProperties = @{@"websocket": @NO};
If this makes the problem go away, please file a bug report. Actually file a 
bug report even if it doesn't help, but note that you tried this.

(Please don't pre-emptively disable WebSockets if you're not seeing problems! 
The new code needs testing, and it will be worth it to have it solid in 1.0. 
It's faster, uses less bandwidth, and puts less load on the server.)

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/6BDA3CB5-BD4B-43BB-BF25-6554D94D57E6%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: P2P connection silly question

2014-03-18 Thread Sandra
One more question, where do I get the netService.HostName and port?

NSString *peerDB = [NSString stringWithFormat:@"http://%@:%@@%@:%d/mydb/";,
@"naomi",@"letmein",netService.hostName,netService.port];


I'm following this example:

https://groups.google.com/forum/#!searchin/mobile-couchbase/p2p/mobile-couchbase/oFGn1zybDcE/7BE3vFXh9xoJ

Thank you,

Sandra



On Tuesday, March 18, 2014 1:18:34 PM UTC-6, Sandra wrote:
>
> Thank you Jens, yes, I'm learning IOS and couch base, so it's been a 
> challenge.
> BR,
> Sandra
>
>
> On Tuesday, March 18, 2014 12:32:27 PM UTC-6, Jens Alfke wrote:
>>
>>
>> On Mar 18, 2014, at 11:26 AM, Sandra  wrote: 
>>
>> > I’m calling it like this: 
>> > BOOL ok = [_listener start:*error]; 
>>
>> That “*” should be an “&”. 
>>
>> (This is the standard way errors are returned in Cocoa code; if you’re 
>> not familiar with it you should read Apple’s docs on error handling in 
>> Cocoa.) 
>>
>> —Jens
>
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/3c14dc6b-181b-45d4-883e-0e70b4c921c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CBLModel Property as an Interface Rather Than a Class

2014-03-18 Thread Scott Ahten
On Monday, March 17, 2014 8:40:18 PM UTC-4, Jens Alfke wrote:
>
>
> Hm, good point. You can look at the implementation in CBLModel to see what 
> it’s doing; IIRC, the Class returned from itemClassForArrayProperty: is 
> only used if the CBLModelFactory doesn’t know what class to use for that 
> particular document. So as long as you’ve registered the document ‘type’ 
> property (or whatever) with the factory, it should be OK.
>
> —Jens
>

Thanks Jens. I'll take a look at the implementation.  

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/613d28fa-d3f4-4890-a85c-5652c8061b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: P2P connection silly question

2014-03-18 Thread Sandra
Thank you Jens, yes, I'm learning IOS and couch base, so it's been a 
challenge.
BR,
Sandra


On Tuesday, March 18, 2014 12:32:27 PM UTC-6, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 11:26 AM, Sandra > 
> wrote: 
>
> > I’m calling it like this: 
> > BOOL ok = [_listener start:*error]; 
>
> That “*” should be an “&”. 
>
> (This is the standard way errors are returned in Cocoa code; if you’re not 
> familiar with it you should read Apple’s docs on error handling in Cocoa.) 
>
> —Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/92272f65-78bc-4e6d-9e5b-f454de459cb5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Thanks J. Chris!

That was exactly happening with my case.

When I  added database creation line before native views (Below bold line)
fixed my problem:

 NSError *error;

 CBLManager* dbmgr = [CBLManager sharedInstance];

//CBLRegisterJSViewCompiler();

self.liteURL = dbmgr.internalURL;

// create a database
*self.database = [dbmgr createDatabaseNamed: @"poc" error: &error]; *
//Native views



On Tue, Mar 18, 2014 at 11:54 PM, J. Chris Anderson wrote:

>
>
> On Tuesday, March 18, 2014 10:29:04 AM UTC-7, Ami Gandhi wrote:
>>
>> After installing app and when running it first time, views are not
>> returning any data (no matter what I do add/edit/delete operations) but
>> after restarting app View is retuning expected data. I am just not sure why
>> it's not returning expected result.
>>
>>
> Maybe the database create operation isn't getting called until after the
> view definitions? So that when the view definitions run on second launch,
> they succeed. Are there any errors coming from the view definition code?
>
>
>> On Tue, Mar 18, 2014 at 8:53 PM, Jens Alfke  wrote:
>>
>>>
>>> On Mar 18, 2014, at 8:04 AM, Ami Gandhi  wrote:
>>>
>>>  But when I install application, first time view is not working, it
>>> starts working from second time.
>>>
>>>
>>> What does "not working" mean, exactly?
>>>
>>> --Jens
>>>
>>> --
>>> 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 mobile-couchba...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-
>>> 5B7023D67676%40couchbase.com
>>> .
>>>
>>> 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 mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/5b61f679-56ac-410e-94cf-4d020081e81a%40googlegroups.com
> .
>
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CALA2sAb88DNE_88f-nTmYaF%3Dv9s2Aaz7BWyuj-BXA3ZQmLie8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: P2P connection silly question

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 11:26 AM, Sandra  wrote:

> I'm calling it like this:
> BOOL ok = [_listener start:*error];

That "*" should be an "&".

(This is the standard way errors are returned in Cocoa code; if you're not 
familiar with it you should read Apple's docs on error handling in Cocoa.)

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/6EF2483C-07F0-4336-9953-9D7634F40653%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


P2P connection silly question

2014-03-18 Thread Sandra
 Hello,  I’m sorry to make this silly question but I’m implementing the 
listener in my IOS couch base program for a P2P connection, and I don’t 
know how to call this method from CBLListener:
- (BOOL) start: (NSError**)outError;

I’m calling it like this:
BOOL ok = [_listener start:*error];

But I’m getting this error:
sending "NSError" to parameter of incompatible tyle "NSError 
*_autoreleasing *"

Any idea is very appreciated,
Sandra

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/98939076-4d25-4a52-bdfe-3d6dd393f9fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread J. Chris Anderson


On Tuesday, March 18, 2014 10:29:04 AM UTC-7, Ami Gandhi wrote:
>
> After installing app and when running it first time, views are not 
> returning any data (no matter what I do add/edit/delete operations) but 
> after restarting app View is retuning expected data. I am just not sure why 
> it's not returning expected result.
>
>
Maybe the database create operation isn't getting called until after the 
view definitions? So that when the view definitions run on second launch, 
they succeed. Are there any errors coming from the view definition code?
 

> On Tue, Mar 18, 2014 at 8:53 PM, Jens Alfke 
> > wrote:
>
>>
>> On Mar 18, 2014, at 8:04 AM, Ami Gandhi > 
>> wrote:
>>
>>  But when I install application, first time view is not working, it 
>> starts working from second time.
>>
>>
>> What does “not working” mean, exactly?
>>
>> —Jens
>>
>> -- 
>> 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 mobile-couchba...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com
>> .
>>
>> 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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5b61f679-56ac-410e-94cf-4d020081e81a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 10:42 AM, Seung Chan Lim  wrote:

> Ah... I figured it out. It seems to have to do with the fact that replication 
> stops when the app goes into PAUSE event and doesn't restart when it goes 
> into RESUME event.

Are you talking about Android specifically? (Please be specific about platforms 
when you ask questions.)

I know that the Couchbase Lite on Android doesn't yet have support for going 
on/offline, so you'll need to restart the replication as a workaround. (Or so I 
believe; Traun is the expert.)

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/2351EBCF-479F-49E1-B2F7-F66394CF2ED2%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trouble linking CBLListener with Xamarin

2014-03-18 Thread Pier-Michael Lemay
Thank you for your reply Jens

However, as I said before, I am kinda new to linking with Xamarin and i 
can't seem to get the correct mtouch argument to insert in my IOS Build 
option.

I have tried :
ObjC
"ObjC"
-gcc_flags "-ObjC"
--gcc_flags="-ObjC"

I always end up crashing at my InternalURL line. Can you give me the exact 
argument to insert into the Additional mtouch arguments section.

Thank you

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/0f84fe18-758c-4b19-a255-dc64e2f3bf2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
Ah... I figured it out. It seems to have to do with the fact that 
replication stops when the app goes into PAUSE event and doesn't restart 
when it goes into RESUME event.

I added an event handler to do a new POST request to _replicate when the 
RESUME event fires.

Thanks again!

slim


On Tuesday, March 18, 2014 1:14:32 PM UTC-4, Seung Chan Lim wrote:
>
> So I just ran the same code on my iPad mini and it worked.
>
> It didn't work when I was running it on my emulator.
>
> Is this odd or is it expected?
>
> slim
>
> On Tuesday, March 18, 2014 1:01:59 PM UTC-4, Seung Chan Lim wrote:
>>
>> I see.
>>
>> So both push and pull sync are started as "continuous," but I'm not 
>> seeing any sync happening.
>>
>> I update the document on my couchbaselite db with new content using "PUT" 
>>
>> I'm awaiting for it to magically make its way to couchbasecloud.com 
>>
>> But I'm not seeing any changes happen when I see it directly on 
>> couchbasecloud.com
>>
>> http://sync.couchbasecloud.com/guestconvo/2474AB4342BC425EB95D7C7679BA6C5E
>>
>> My couchbaselite is on rev 224 and the copy on couchbasecloud.com is on 
>> 221
>>
>> Am I missing something else?
>>
>> Thanks again for all your help,
>>
>> slim
>>
>> On Tuesday, March 18, 2014 12:46:42 PM UTC-4, Jens Alfke wrote:
>>>
>>>
>>> On Mar 18, 2014, at 9:38 AM, Seung Chan Lim  wrote:
>>>
>>> So I just tried continuous:true and I get back a 200 status but the body 
>>> is missing ok:true
>>> What does that mean?
>>>
>>>
>>> A minor but harmless incompatibility with CouchDB, I suppose.
>>>
>>> —Jens
>>>
>>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/fea8dcfc-f705-426b-8ebd-7026ca790786%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
After installing app and when running it first time, views are not
returning any data (no matter what I do add/edit/delete operations) but
after restarting app View is retuning expected data. I am just not sure why
it's not returning expected result.

On Tue, Mar 18, 2014 at 8:53 PM, Jens Alfke  wrote:

>
> On Mar 18, 2014, at 8:04 AM, Ami Gandhi  wrote:
>
> But when I install application, first time view is not working, it starts
> working from second time.
>
>
> What does "not working" mean, exactly?
>
> --Jens
>
> --
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com
> .
>
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CALA2sAaapi3wR_bXCLkFi5YO7DXmNwjdG4Dc9GufY%3Dn0b-uweQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sync troubles with beta3

2014-03-18 Thread Jens Alfke
I've filed this as issue #280. Let's continue the discussion there.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/ABDF3255-EC29-43B9-856A-C06D62ADF49C%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
So I just ran the same code on my iPad mini and it worked.

It didn't work when I was running it on my emulator.

Is this odd or is it expected?

slim

On Tuesday, March 18, 2014 1:01:59 PM UTC-4, Seung Chan Lim wrote:
>
> I see.
>
> So both push and pull sync are started as "continuous," but I'm not seeing 
> any sync happening.
>
> I update the document on my couchbaselite db with new content using "PUT" 
>
> I'm awaiting for it to magically make its way to couchbasecloud.com 
>
> But I'm not seeing any changes happen when I see it directly on 
> couchbasecloud.com
>
> http://sync.couchbasecloud.com/guestconvo/2474AB4342BC425EB95D7C7679BA6C5E
>
> My couchbaselite is on rev 224 and the copy on couchbasecloud.com is on 
> 221
>
> Am I missing something else?
>
> Thanks again for all your help,
>
> slim
>
> On Tuesday, March 18, 2014 12:46:42 PM UTC-4, Jens Alfke wrote:
>>
>>
>> On Mar 18, 2014, at 9:38 AM, Seung Chan Lim  wrote:
>>
>> So I just tried continuous:true and I get back a 200 status but the body 
>> is missing ok:true
>> What does that mean?
>>
>>
>> A minor but harmless incompatibility with CouchDB, I suppose.
>>
>> —Jens
>>
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/7c9a1383-3091-48e1-8a70-fc135190ef56%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
I see.

So both push and pull sync are started as "continuous," but I'm not seeing 
any sync happening.

I update the document on my couchbaselite db with new content using "PUT" 

I'm awaiting for it to magically make its way to couchbasecloud.com 

But I'm not seeing any changes happen when I see it directly on 
couchbasecloud.com

http://sync.couchbasecloud.com/guestconvo/2474AB4342BC425EB95D7C7679BA6C5E

My couchbaselite is on rev 224 and the copy on couchbasecloud.com is on 221

Am I missing something else?

Thanks again for all your help,

slim

On Tuesday, March 18, 2014 12:46:42 PM UTC-4, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 9:38 AM, Seung Chan Lim > 
> wrote:
>
> So I just tried continuous:true and I get back a 200 status but the body 
> is missing ok:true
> What does that mean?
>
>
> A minor but harmless incompatibility with CouchDB, I suppose.
>
> —Jens
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/7ee78702-a4de-4de9-aacd-c7c8a3309e23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sync troubles with beta3

2014-03-18 Thread Jens Alfke

On Mar 17, 2014, at 10:56 AM, Todd Freese  wrote:

> Also noticed a couple logs from the sync gateway that look interesting:
> 2014/03/17 12:38:24 go-couchbase: call to 
> Do("8507820B-E962-4E6A-9F85-7D17985F29E6") in 
> github.com/couchbaselabs/go-couchbase.(*Bucket).GetsRaw took 338.040947ms

That's just a performance note about a Couchbase API call. I think 200ms is the 
threshold where it logs. Ignoreable unless you're troubleshooting performance 
problems.

> There are several of these:
> 12:42:34.335999 HTTP: #075: --> 404 missing  (0.0 ms)

Depends on what the request URL is (you can search backwards for "#075" to see 
the request line.) Most likely it's a GET of a _local document, in which case 
it's expected for a first-time sync (it's looking up a saved checkpoint for the 
replication but there isn't one yet.)

I'm looking at your full log dumps now...

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/B27B2B6D-76B3-4E4F-BDF7-DB390EA606CB%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compression Errors

2014-03-18 Thread mike
Sure thing.

On Tuesday, 18 March 2014 11:35:54 UTC-5, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 9:19 AM, mike > wrote: 
>
> > 11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id="(null)"]: 
> received corrupt gzip-encoded JSON part 
>
> Is this reproducible with the same document? If so, could you use ‘curl’ 
> on the URL that it was GETting (as shown in the gateway log, or in the CBL 
> logs with ‘RemoteRequest’ logging) and save that to a file and send it to 
> me? 
>
> —Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/23dde2ef-6b9f-46da-a259-f97ab6c3e878%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 9:38 AM, Seung Chan Lim  wrote:

> So I just tried continuous:true and I get back a 200 status but the body is 
> missing ok:true
> What does that mean?

A minor but harmless incompatibility with CouchDB, I suppose.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/DC0CE75D-D1B1-4E8E-995E-0E401CBAB513%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
So I just tried continuous:true and I get back a 200 status but the body is 
missing ok:true

What does that mean?

slim

On Tuesday, March 18, 2014 12:18:22 PM UTC-4, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 8:30 AM, Seung Chan Lim > 
> wrote:
>
> When you say "start a continuous push replication," do you mean simply 
> make a single HTTP REST call to _replicate on my couchbase lite with source 
> being the couchbasecloud.com sync gateway and target being my couchbase 
> lite ? The rest is magic? Maybe I don't understand what you mean by 
> "continous push replication." Can you help me better understand?
>
>
> The Concepts 
> Guide 
> explains 
> continuous replication.
>
> Looks like our REST doc for 
> _replicate 
> is 
> missing the ‘continuous’ property. Try the CouchDB 
> docs 
> instead. 
> (Overview here
> .)
>
> —Jens
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/2509cf18-4945-48f6-b95f-21e18b3cceb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trouble linking CBLListener with Xamarin

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 8:46 AM, Pier-Michael Lemay  wrote:

> CouchbaseLite seems to work fine but when I'm trying to use the manager's 
> InternalURL, I get "Assertion failed: CBL_URLProtocol class not found; link 
> CouchbaseLiteListener.framework". 

Hm, make sure you've added the "-ObjC" linker flag, otherwise that class may be 
dead-stripped.
If that doesn't help, look for any linker warnings produced when building your 
app. They might contain clues.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/379B03AE-90B5-4EEC-AF37-8761F7B4FF08%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Compression Errors

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 9:19 AM, mike  wrote:

> 11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id="(null)"]: received 
> corrupt gzip-encoded JSON part

Is this reproducible with the same document? If so, could you use ‘curl’ on the 
URL that it was GETting (as shown in the gateway log, or in the CBL logs with 
‘RemoteRequest’ logging) and save that to a file and send it to me?

—Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/4D212FBC-302D-4F74-97FE-8295FE21D74B%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Trouble linking CBLListener with Xamarin

2014-03-18 Thread Pier-Michael Lemay
Hi,

Maybe you guys arent familiar with Xamarin but i'm out of ideas to make 
this work and i'm kinda new to linking(with xamarin).

I have downloaded the latest beta 2 for couchebaselite framework, added 
both 64 bits framework to my project directory, downloaded the 
CouchbaseLite component on the Xamarin store and added the Couchbase.dll 
from that component to my References.

CouchbaseLite seems to work fine but when I'm trying to use the manager's 
InternalURL, I get "Assertion failed: CBL_URLProtocol class not found; link 
CouchbaseLiteListener.framework". 

Is there any CouchbaseLiteListener.dll or something else i could be missing 
to link the listener to my Xamarin project.

Thank you

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/b265f59b-0086-4527-8a48-e145222ca253%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Compression Errors

2014-03-18 Thread mike
Using CBL beta 3, SG beta 3 and Couchbase Server 2.2, CBL reports errors 
when 'compessResponses' is true in my SG config.  Here's an example of the 
errors CBL is reporting:

11:09:12.323‖ WARNING*** : CBLMultipartDocumentReader[_id="(null)"]: 
received corrupt gzip-encoded JSON part

11:09:12.323‖CBLMultipartDownloader[/learning/4609AA39-D4EF-4ECC-96B3-015283ED183B]:
 Got 
error Error Domain=CBLHTTP Code=502 "502 Invalid response from remote 
replication server" UserInfo=0x11001d2a0 
{NSURL=https://couchdemo.infinitecampus.com/learning/4609AA39-D4EF-4ECC-96B3-015283ED183B?rev=50-54037c0b0359fd8bf6cdb66ebdb288b0&revs=true&attachments=true,
 
NSLocalizedFailureReason=Invalid response from remote replication server, 
NSLocalizedDescription=502 Invalid response from remote replication server}

SG doesn't report an error:

11:09:11.011180 HTTP:  #970: GET 
/learning/4609AA39-D4EF-4ECC-96B3-015283ED183B?rev=50-54037c0b0359fd8bf6cdb66ebdb288b0&revs=true&attachments=true
  
(as redacted) 


As long as I set 'compressResponses' false in the SG config file, 
everything works as expected.  Could this be a result of using Couchbase 
Server 2.2? 

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/b383f73c-81b3-4f86-b286-4502642298fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 8:30 AM, Seung Chan Lim  wrote:

> When you say "start a continuous push replication," do you mean simply make a 
> single HTTP REST call to _replicate on my couchbase lite with source being 
> the couchbasecloud.com sync gateway and target being my couchbase lite ? The 
> rest is magic? Maybe I don't understand what you mean by "continous push 
> replication." Can you help me better understand?

The Concepts Guide explains continuous replication.

Looks like our REST doc for _replicate is missing the 'continuous' property. 
Try the CouchDB docs instead. (Overview here.)

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/33DCFC91-02C7-4E06-A7A6-E8233E521D02%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
The only "continuous" feature I see is as a query parameter for the 
_changes REST call. Is something similar available for the _replicate REST 
call?

slim


On Tuesday, March 18, 2014 11:30:08 AM UTC-4, Seung Chan Lim wrote:
>
> Wait... so there's something I'm missing
>
> When you say "start a continuous push replication," do you mean simply 
> make a single HTTP REST call to _replicate on my couchbase lite with source 
> being the couchbasecloud.com sync gateway and target being my couchbase 
> lite ? The rest is magic? Maybe I don't understand what you mean by 
> "continous push replication." Can you help me better understand?
>
>
>
> slim
>
> On Tuesday, March 18, 2014 11:25:41 AM UTC-4, Jens Alfke wrote:
>>
>>
>> On Mar 18, 2014, at 8:05 AM, Seung Chan Lim  wrote:
>>
>> The PUSH seems easy enough, whenever I have new data I push by making a 
>> REST call to _replicate on my couchbase lite.
>>
>>
>> Don’t do that. You should start a continuous push replication when the 
>> app starts up. The replication will then take care of watching for database 
>> changes and pushing them. (And it will intelligently do this when the 
>> device is online, and stop when offline.)
>>
>> As for the PULL, the simplest thing I can do is just have a 
>> window.setTimeout that calls _replicate on my couchbase lite (with the 
>> source and target reversed from PUSH), but I'd like to _only_ PULL from the 
>> sync gateway the moment it notifies it has something for me?
>>
>>
>> Again, you should simply start a continuous pull replication when the app 
>> starts, and it will take care of watching for changes remotely and pulling 
>> them.
>>
>> —Jens
>>
>>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/c673054f-6c18-46ae-9dc1-a04a4e3e5c0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
Wait... so there's something I'm missing

When you say "start a continuous push replication," do you mean simply make 
a single HTTP REST call to _replicate on my couchbase lite with source 
being the couchbasecloud.com sync gateway and target being my couchbase 
lite ? The rest is magic? Maybe I don't understand what you mean by 
"continous push replication." Can you help me better understand?



slim

On Tuesday, March 18, 2014 11:25:41 AM UTC-4, Jens Alfke wrote:
>
>
> On Mar 18, 2014, at 8:05 AM, Seung Chan Lim > 
> wrote:
>
> The PUSH seems easy enough, whenever I have new data I push by making a 
> REST call to _replicate on my couchbase lite.
>
>
> Don’t do that. You should start a continuous push replication when the app 
> starts up. The replication will then take care of watching for database 
> changes and pushing them. (And it will intelligently do this when the 
> device is online, and stop when offline.)
>
> As for the PULL, the simplest thing I can do is just have a 
> window.setTimeout that calls _replicate on my couchbase lite (with the 
> source and target reversed from PUSH), but I'd like to _only_ PULL from the 
> sync gateway the moment it notifies it has something for me?
>
>
> Again, you should simply start a continuous pull replication when the app 
> starts, and it will take care of watching for changes remotely and pulling 
> them.
>
> —Jens
>
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/f5a9915d-de24-443d-8f8d-bbb4533e6d6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: autoSave question

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 8:19 AM, Todd Freese  wrote:

> All of my CBLModels have autosave = YES. Do I need to worry about making sure 
> the model object does not get deallocated until the autoSave runs? Or does 
> autoSave keep a strong reference to the object until the autoSave completes? 
> I'm using ARC.

Don’t worry about it. The database keeps a collection of unsaved models to 
ensure that they don’t get deallocated till the save happens. (This applies 
with or without autosave, btw.)

—Jens

smime.p7s
Description: S/MIME cryptographic signature


Re: Efficient Push/pull - Best Practices?

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 8:05 AM, Seung Chan Lim  wrote:

> The PUSH seems easy enough, whenever I have new data I push by making a REST 
> call to _replicate on my couchbase lite.

Don't do that. You should start a continuous push replication when the app 
starts up. The replication will then take care of watching for database changes 
and pushing them. (And it will intelligently do this when the device is online, 
and stop when offline.)

> As for the PULL, the simplest thing I can do is just have a window.setTimeout 
> that calls _replicate on my couchbase lite (with the source and target 
> reversed from PUSH), but I'd like to _only_ PULL from the sync gateway the 
> moment it notifies it has something for me?

Again, you should simply start a continuous pull replication when the app 
starts, and it will take care of watching for changes remotely and pulling them.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/22A41AF8-8FFB-4647-A3F4-676C319F8361%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 8:04 AM, Ami Gandhi  wrote:

> But when I install application, first time view is not working, it starts 
> working from second time.

What does "not working" mean, exactly?

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/48102C50-4A2B-45C5-850D-5B7023D67676%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


autoSave question

2014-03-18 Thread Todd Freese
All of my CBLModels have autosave = YES. Do I need to worry about making 
sure the model object does not get deallocated until the autoSave runs? Or 
does autoSave keep a strong reference to the object until the autoSave 
completes? I'm using ARC.

Todd

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/81e002f4-d328-4d94-b0dc-48389778d957%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Efficient Push/pull - Best Practices?

2014-03-18 Thread Seung Chan Lim
Hi all,

I've just begun using couchbase lite through phonegap. I'm starting to use 
the http://couchbasecloud.com sync gateway server to see how I can 
propagate data from one device to another. 

Now I'm looking for some best practice tips.

The PUSH seems easy enough, whenever I have new data I push by making a 
REST call to _replicate on my couchbase lite. Are there best practice tips 
here?

As for the PULL, the simplest thing I can do is just have a 
window.setTimeout that calls _replicate on my couchbase lite (with the 
source and target reversed from PUSH), but I'd like to _only_ PULL from the 
sync gateway the moment it notifies it has something for me? What's the 
best way to implement such notification mechanism? Is it to connect 
directly to the sync gateway on its _changes feed and call _replicate on my 
couchbase lite when I get something from the feed? (BTW, what's the 
difference between normal and long poll?)

thank you

slim

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/04d9ff24-f32a-4a54-869b-bd24672fe65f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Hi Jens!

I have fixed this issue by using "db_name/getrecords_typewise"
But when I install application, first time view is not working, it starts
working from second time.

Any idea why this happens?


On Tue, Mar 18, 2014 at 8:30 PM, Jens Alfke  wrote:

>
> On Mar 18, 2014, at 3:27 AM, Ami Gandhi  wrote:
>
> var design = "_design/*db_name*";
>
> ...
>
> CBLView* view = [self.database viewNamed: @"*viewdoc*
> /getrecords_typewise"];
>
>
> Those don't match. The second component of the design doc's name has to
> match the first component of the CBLView name.
>
> --Jens
>
>  --
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/5AE063FC-25EA-480B-A325-A706803299F8%40couchbase.com
> .
>
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CALA2sAZ7ohNWSL96NZxrM7ooqj1XNEAD-17QNx7ADZ%3D_vuGB0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 3:27 AM, Ami Gandhi  wrote:

> var design = "_design/db_name";
...
> CBLView* view = [self.database viewNamed: @"viewdoc/getrecords_typewise"];

Those don't match. The second component of the design doc's name has to match 
the first component of the CBLView name.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5AE063FC-25EA-480B-A325-A706803299F8%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error in CBLReplication CBLBeta3

2014-03-18 Thread Jens Alfke

On Mar 18, 2014, at 5:21 AM, Endika Montejo  
wrote:

> 2014-03-18 13:15:07.170 xxx[17682:b417] An instance 0x60114520 of class 
> CBLReplication was deallocated while key value observers were still 
> registered with it. Observation info was leaked, and may even become 
> mistakenly attached to some other object. Set a breakpoint on 
> NSKVODeallocateBreak to stop here in the debugger. Here's the current 
> observation info:

This is an error from Foundation's key-value observing telling you that one of 
your objects registered as an observer of a CBLReplication object but forgot to 
remove itself before that CBLReplication was dealloced.

>  completedChangesCount, Options:  Context: 0x0, 
> Property: 0x6005aac0>
> 
>  error, Options:  Context: 0x0, Property: 
> 0x602503b0>

Those "Observer:" values show the addresses of your objects that are 
registered, which you can then inspect in the debugger.

--Jens

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/F9B7380C-C7B9-4EE4-A8BE-9E41D6687EFA%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: couchbase phonegap w/o XMLHttpRequest

2014-03-18 Thread Seung Chan Lim
Ah.. Got it. Thank you!

slim

On Monday, March 17, 2014 9:01:40 PM UTC-4, J. Chris Anderson wrote:
>
> The example app 
> code
>  uses 
> a library I wrote  that I tend to use 
> from nodejs. I should probably just swap it out for jQuery or Zepto as it 
> doesn't bring much beyond what they offer.
>
> If I was writing it today I'd probably start here: 
> http://zeptojs.com/#$.ajax
>
> One call in the example app you can't forget is the one that gets you the 
> URL of the local Couchbase Lite instance.
>
> cblite.getURL(function(err, localURL) {
>   var dbURL = localURL + "mydatabase";
>   $.ajax({url : dbURL, type : "POST", dataType : "json", data : {test : 
> "document}, success : function(resp){alert(resp)}})
> })
>
>
>
> On Monday, March 17, 2014 2:25:41 PM UTC-7, Seung Chan Lim wrote:
>>
>> Hi I'm new to developing phonegap applications and couchbase lite.
>>
>> I've managed to get a simple app written and running on an iPad using 
>> both tech, but I feel as if I'm missing something.
>>
>> Currently I'm interfacing couchbase lite functionalities by using an 
>> XMLHttpRequest object. But the sample code uses no XML HTTP Request. What 
>> is going on? How can I get documentation on how to use couchbase lite 
>> without XML HTTP Request object?
>>
>> In the sample code I notice that it uses global variables like "config." 
>> Where can I find documentation on these?
>>
>> thank you
>>
>> slim
>>
>

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/41b476b0-2f94-4438-b778-2eb7ba8914fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error in CBLReplication CBLBeta3

2014-03-18 Thread Endika Montejo
Good afternoon,

We have just integrated the CBLBeta3 and I have just seen an error when 
doing the log out. When this happen, we make a replication.

The error is the following:

*2014-03-18 13:15:07.170 xxx[17682:b417] An instance 0x60114520 of 
class CBLReplication was deallocated while key value observers were still 
registered with it. Observation info was leaked, and may even become 
mistakenly attached to some other object. Set a breakpoint on 
NSKVODeallocateBreak to stop here in the debugger. Here's the current 
observation info:*

* (*

* Context: 0x0, 
Property: 0x6005aac0>*

* Context: 0x0, Property: 
0x602503b0>*

*)*

*2014-03-18 13:15:07.171 xx[17682:b417] An instance 0x60114490 of class 
CBLReplication was deallocated while key value observers were still 
registered with it. Observation info was leaked, and may even become 
mistakenly attached to some other object. Set a breakpoint on 
NSKVODeallocateBreak to stop here in the debugger. Here's the current 
observation info:*

* (*

* Context: 0x0, 
Property: 0x6005aac0>*

* Context: 0x0, Property: 
0x602503b0>*

*)*


Any help is welcomed

-- 
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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/9036d460-5313-43c8-9bff-e7ccd51ac097%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TodoLite-PhoneGap demo app not working

2014-03-18 Thread Ami Gandhi
Hi Jens!

>From JS, I have created views by following way:

var design = "_design/db_name";
db.put(design,
{
views :
{
 getrecords_typewise:
{
map:  function(doc) {
if (doc.type && doc.is_active)
{
emit([doc.type],doc)

}

}.toString()
}
}
}, function(){
  cb(false, db([design, "_view"]))
   });

And it's working in my iOS application.
But if I create view from iOS native but it's not working. Although I
created views in native android which is working great.
Here is iOS code:

 CBLManager *manager = [CBLManager sharedInstance];
NSError *error;
self.database = [manager databaseNamed: @"db_name" error: &error];
CBLView* view = [self.database viewNamed:
@"viewdoc/getrecords_typewise"];
//I also tried this:
CBLView* view = [self.database viewNamed: @"getrecords_typewise"];

[view setMapBlock: MAPBLOCK({
id type = [doc objectForKey: @"type"];
if (type) emit(type, doc);
}) version: @"1.0"];

Please let me know how to create native iOS view, I want to call it from
JS. (same way which I did for Android).

Thanks

On Tue, Mar 18, 2014 at 6:06 AM, Jens Alfke  wrote:

>
> On Mar 17, 2014, at 2:29 PM, Ami Gandhi  wrote:
>
> > CBLView* view = [self.database viewNamed: @"getrecords_typewise"];
>
> I'm pretty sure you have to name your views in the form
> "designdocname/viewname" to make them compatible with the REST API (since
> that's how views are specified in CouchDB.) I don't know anything about the
> JS API you're using to query the view, but it probably expects the view
> name in the same format.
>
> --Jens
>
> --
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mobile-couchbase/A9E41ECA-89EF-4636-9008-493B9702C819%40couchbase.com
> .
> 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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CALA2sAZH-9rDnDOh4_Pnw5NB9D81bK%3DKNoaB9%2B8qcr_q018OsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.