issue with ios example codes

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

Moderators: Lapo, Bax

limengran
Posts: 4
Joined: 03 Jul 2013, 10:41

issue with ios example codes

Postby limengran » 03 Jul 2013, 11:26

Hi! I've downloaded and installed Smart Fox Server by following the instructions given in the documentation. After that, I downloaded the ios examples and successfully compiled them. When I try to run them, all of them crashed and gave me the same error message, like this one that I've encountered with SimpleChat,
"2013-07-03 18:44:34.679 SimpleChat[3162:c07] -[__NSCFDictionary caseInsensitiveCompare:]: unrecognized selector sent to instance 0x6b15be0".

I added an exception breakpoint, and got the stack trace for SimpleChat below:
Screen Shot 2013-07-03 at 7.00.13 PM.png
(88.6 KiB) Not downloaded yet


Any help would be appreciated! Thanks in advance!
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: issue with ios example codes

Postby A51Integrated » 03 Jul 2013, 13:23

My best guess would be that the app is having trouble finding or reading the config XML. Can you double check that it's readable and in the right location?
A51 Integrated
http://a51integrated.com / +1 416-703-2300
limengran
Posts: 4
Joined: 03 Jul 2013, 10:41

Re: issue with ios example codes

Postby limengran » 05 Jul 2013, 04:26

A51Integrated wrote:My best guess would be that the app is having trouble finding or reading the config XML. Can you double check that it's readable and in the right location?


Thanks for the reply! I've just checked. "config.xml" is readable and in the root directory of the solution "SimpleChat".
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: issue with ios example codes

Postby Lapo » 05 Jul 2013, 06:47

Can you show us the content of the file?
Maybe some of the xml got corrupted.
Lapo
--
gotoAndPlay()
...addicted to flash games
limengran
Posts: 4
Joined: 03 Jul 2013, 10:41

Re: issue with ios example codes

Postby limengran » 05 Jul 2013, 07:25

sure. I did not make any changes to the sample codes, so here it is, "config.xml":

<SmartFoxConfig>
<!-- Mandatory Settings -->
<ip>127.0.0.1</ip>
<port>9933</port>
<zone>BasicExamples</zone>
<!-- End Mandatory Settings -->

<debug>true</debug>

<httpPort>8080</httpPort>
<useBlueBox>true</useBlueBox>
<blueBoxPollingRate>500</blueBoxPollingRate>
</SmartFoxConfig>
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: issue with ios example codes

Postby Lapo » 05 Jul 2013, 08:27

Thanks, everything looks good there.
What XCode version are you using?
Lapo

--

gotoAndPlay()

...addicted to flash games
limengran
Posts: 4
Joined: 03 Jul 2013, 10:41

Re: issue with ios example codes

Postby limengran » 05 Jul 2013, 08:51

Lapo wrote:Thanks, everything looks good there.
What XCode version are you using?


Thanks a lot for your kind attention! :)

It's XCode 4.6.3
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: issue with ios example codes

Postby Lapo » 05 Jul 2013, 09:24

Actually I see the same problem myself :shock:
We'll take a closer look and see what's wrong. It seems the example package is corrupt.

Thanks
Lapo

--

gotoAndPlay()

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

Re: issue with ios example codes

Postby Lapo » 05 Jul 2013, 10:13

UPDATE: There seem to be a problem with the config.xml files in the project, not sure why but that's where the issue is coming from.
We are going to update the whole example pack later today, but if you want to fix the problem yourself just open the xml file, remove all of its content and replace it with this:

Code: Select all

<SmartFoxConfig>
   <ip>127.0.0.1</ip>
   <port>9933</port>
   <blueBoxIpAddress>127.0.0.1</blueBoxIpAddress>
   <blueBoxPort>8080</blueBoxPort>
   <smartConnect>true</smartConnect>
   <httpPort>8080</httpPort>
   <httpPollSpeed>750</httpPollSpeed>
   <zone>BasicExamples</zone>
</SmartFoxConfig>

Save and retry, it shouldn't complain anymore.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 34 guests