API version 1.1.8 Available

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: API version 1.1.8 Available

Postby rjgtav » 20 Sep 2013, 23:56

@clam61

Where's the SFS2X you're trying to connect to? Is it running on a machine with a reasonable internet connection speed?
Have you tried running your app on another phone from a different network provider?
Have you tried remote debugging to see if there is any exception firing on the mobile device?

Thanks
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: API version 1.1.8 Available

Postby clam61 » 21 Sep 2013, 01:10

Where's the SFS2X you're trying to connect to? Is it running on a machine with a reasonable internet connection speed?

Yeah we have dedicated server hosting

Have you tried running your app on another phone from a different network provider?

Different phone but same service provider.

Have you tried remote debugging to see if there is any exception firing on the mobile device?

We didnt use remote debugging (link to info about that if you can), but I was running the application on my device connected to Xcode's debugger with Wifi turned off. No exceptions. Just these error messages

viewtopic.php?f=21&t=16414

Another big question is--why is it not switching to bluebox?
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 22 Sep 2013, 08:32

clam61 wrote:Another big question is--why is it not switching to bluebox?

Do you get a connection failed event on the client?
If so you should make sure that you have configured the client to use the BlueBox (using the external config.xml file or ConfigData class)

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: API version 1.1.8 Available

Postby clam61 » 24 Sep 2013, 03:56

Hi Lapo

Yes I do get an onConnection event. this is the output


2013-09-23 20:22:18.040 ZombieBash[3550:907] [SFS - INFO][ BB-Send ]: sfsHttp=null%7Cconnect%7Cnull

then if i try to connect again i get:


2013-09-23 20:22:18.483 ZombieBash[3550:907] [SFS - WARN]A connection attempt is already running
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 24 Sep 2013, 09:58

Sorry, I don't think I understand.
If you are getting the correct onConnection event, why would you try to connect again?
Once you are connected you just need to proceed with the login.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: API version 1.1.8 Available

Postby clam61 » 24 Sep 2013, 22:00

when the onconnection event fires it doesn't mean that you are connected. you have to check the .connected property on the client object to see if it has connected or not

there is no onconnectionerror event.
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: API version 1.1.8 Available

Postby clam61 » 25 Sep 2013, 04:00

Any idea when the update will be out?
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 25 Sep 2013, 08:48

clam61 wrote:when the onconnection event fires it doesn't mean that you are connected. you have to check the .connected property on the client object to see if it has connected or not

there is no onconnectionerror event.

No this incorrect.
When the onConnection event fires there is a parameter passed to you called "success" (bool) which is true if the connection was successful and false otherwise

If you check any of our examples (e.g. the SimpleChat) you will see how this is done:

Code: Select all

- (void)onConnection:(SFSEvent *)evt
{
    NSLog(@"AppDelegate::onConnection");
   if ([[evt.params objectForKey:@"success"] boolValue])
    {
      // ... ok we're good... proceed with login...
   }
   else
    {
      // Ouch, error...
   }
}
Lapo

--

gotoAndPlay()

...addicted to flash games
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: API version 1.1.8 Available

Postby clam61 » 04 Oct 2013, 15:02

is 1.1.8 with iOS5 compatibility still in the works?
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 04 Oct 2013, 17:31

We had a release ready many weeks ago, we sent it to a client with the same problem who reported that he was still having problems compiling.
I am not sure how that email exchange has gone, I am not sure if they replied. In any case I have tested on multiple machines and it work just fine.

I think we'll publish it next week but if you need it earlier just shoot at email to our support@... email box with a reference to this thread,

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 09 Oct 2013, 08:39

UPDATE:
Please disregard my previous reply, it was incorrect. I verified with our developers. The current release 1.1.8, available since August 30th, is already working correctly with iOS5.

We're now working on release 1.2.0 which will be ARC-only.
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
davidps
Posts: 11
Joined: 02 Aug 2012, 13:48

Re: API version 1.1.8 Available

Postby davidps » 09 Oct 2013, 15:04

Hi Lapo,

While v1.1.8 compiles fine for devices, it doesn't do so for the simulator; we are getting lots of link-time errors regarding duplicate symbols with basically every name defined by the SmartFoxServer API. This has never happened before, so we're currently stuck with v1.1.7 as having a working build for the simulator is quite important to us. Do you have any ideas on what might be wrong here?
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 09 Oct 2013, 16:03

I have absolutely no idea. We have tested this over and over again and I can't see any problems.
Maybe you are using XCode 5? That one gave me some problems and we haven't investigated what's new there yet.

Would you mind trying to download the API again and make sure you clear your project before compiling?
When we originally launched version 1.1.8 we had to re-upload the API a second time because of some compilation issues, if I recall correctly. It was probably the first days of September.

Also make sure to check that the "Frameworks search path" in Xcode doesn't contain references to old copies of the API.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
davidps
Posts: 11
Joined: 02 Aug 2012, 13:48

Re: API version 1.1.8 Available

Postby davidps » 09 Oct 2013, 16:25

Yes, we use Xcode 5. I've redownloaded the library and rebuilt from scratch a couple of times now to no avail. There are no references left to old copies of the API either.
User avatar
Lapo
Site Admin
Posts: 21647
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: API version 1.1.8 Available

Postby Lapo » 09 Oct 2013, 16:39

Ok I see. As I said XCode 5 is not yet tested thoroughly.
I've noticed that the OSX framework of our API doesn't work anymore under 5 and while doing some simple tests I also found it pretty unstable. I have reverted to 4.6 and our Obj-C developer will take a look at version 5 while we release the next update which will be ARC-only.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 0 guests