pubnub/pubnub-api — Issue #75: XDR and XDRA functions on Titanium Mobile
Author: orangevinz
Created: 2012-03-08 15:33:00+00:00
State: open

Config :
Titanium Mobile 1.8.2
Mac OS 10.6.8
IOS SDK : 4.3
Iphone Simulator

1. It seems there is an undefined variable (SECOND) in the pubnub.js file at the line 486.

I changed : timeout( pubnub, SECOND );
By : timeout( pubnub, 1000 );

I guess it's just a timeout for a (re)connection so it works, and there are no error anymore.

2. Then and it's the main point, the XDR function doesn't work but the XDRA does!.

If I understand the code, the first one is coded for Iphone and the second one for Android.
So if I put the ANDROID variable to true, it works because it's gonna use the Xdra function.

The difference between them is the network client:
Iphone is : Ti.Network.Socket.createTCP();
Android is : Ti.Network.createHTTPClient();

It's a half solution, I know

Thanks in advance for your help