ios compilation problems

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

Moderators: Lapo, Bax

User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: ios compilation problems

Postby A51Integrated » 24 Feb 2012, 12:26

We've managed to recreate the issue with your project, however, we have a second project that we created that works just fine. We've been comparing projects to determine what the cause may be, but have yet to find anything.

The actual connect and handshake code is identical to the previous API code with one exception: the handshake now allows for OSX devices to connect so there are preprocessor directives to include certain frameworks and device identifiers.

The new API includes:

Code: Select all

        #if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
            //get device system version
            ...
        #else
            //piece together the version of the OS
            ...
        #endif

So for it to work in the simulator but not the device is puzzling, since they are routed through the same logic. Otherwise, the handshake request is identical. We'll continue to debug the application to see if we can determine the issue. If anything else comes to mind or arises, please let us know.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
thuypn1102
Posts: 4
Joined: 24 Feb 2012, 06:25

Re: ios compilation problems

Postby thuypn1102 » 24 Feb 2012, 14:06

Same issue here, but i tested on another devices. I got same problem for every devices i tried (iPhone 3GS - ios 4.2.1, iPhone 4s - iOS 5.0.1, iPad2 - iOS 5.0.1).
It works very good with every Android device and flash, iOS Simulator also, but iOS device.
Another problem happened with iOS Simulator: - When i tried send chat message to server, the first 7 msgs was ok, but at the 8th message, i got crash before it come to onmessage() delegate .

Code: Select all

2012-02-24 20:41:37.916 SFS[51441:f803] [SFS - INFO]WRITE - Written directly to outStream len:58
2012-02-24 20:41:37.918 SFS[51441:f803] [SFS - INFO]Data Write: Binary Size: 58
80 00 37 12 00 03 00 01 63 02 00 00 01 61 03 00    ..7.....c....a..
07 00 01 70 12 00 04 00 01 72 04 00 00 00 00 00    ...p.....r......
01 6d 08 00 08 74 68 75 72 79 77 6e 62 00 01 75    .m...thurywnb..u
04 00 00 00 0f 00 01 74 02 00                      .......t..     
2012-02-24 20:41:37.921 SFS[51441:f803] -[__NSCFString info:]: unrecognized selector sent to instance 0x6c843d0
2012-02-24 20:41:37.959 SFS[51441:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString info:]: unrecognized selector sent to instance 0x6c843d0'
*** First throw call stack:
(0x17af052 0x1aeed0a 0x17b0ced 0x1715f00 0x1715ce2 0x2cb5a 0x7cb6 0x1780501 0x175006d 0x17507ca 0x174fe71 0x1750727 0x2853ad 0x1e1191 0x1e10a1 0x171de44 0x178397f 0x16e6c39 0x16e6454 0x16e5db4 0x16e5ccb 0x1ce8879 0x1ce893e 0x3d5a9b 0x2492 0x2405 0x1)

Waiting ur help, thank so much!
hasbean
Posts: 43
Joined: 02 Sep 2009, 11:39

Re: ios compilation problems

Postby hasbean » 25 Feb 2012, 06:50

I also get that chat bug. The first 8 send fine, but the ninth chat message crashes with EXC_BAD_ACCESS
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: ios compilation problems

Postby A51Integrated » 25 Feb 2012, 19:19

Yes. There is a confirmed bug after sending 8 messages. It has to do with the logger. Until a fix is released, you should be able to get around the issue by turning debug loggin off (I know that's really not a solution). The bug has been fixed and will be posted in a new update shortly.

The crash that some people are experiencing is being caused by the package that compiles the framework. The API is working as expected, however, once packaged, some installations of XCode are seeing crashes while others do not. We are continuing to investigate this and will let you know of any progress shortly.
A51 Integrated

http://a51integrated.com / +1 416-703-2300
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: ios compilation problems

Postby A51Integrated » 27 Feb 2012, 16:19

Hi All,

I've attached here an updated API for TESTING ONLY!!!!!

A few things have changed - most notable:

No longer is there a dependance on the TouchXML library.
Please remove the "-lxml2" from "Other Linker Flags" - it is no longer required
Please remove the recursive "/usr/include/libxml2" from "Header Search Paths" - it is no longer required

This will make adding the framework to projects easier. The only other linker flags required should be -lz and -ObjC.

Please report any warning or errors and if so, how to reproduce them and what version of XCode/OS etc you are using.

Again, API for TESTING ONLY!!!!!

EDIT: file removed to avoid confusion
A51 Integrated

http://a51integrated.com / +1 416-703-2300
thuypn1102
Posts: 4
Joined: 24 Feb 2012, 06:25

Re: ios compilation problems

Postby thuypn1102 » 28 Feb 2012, 07:12

Worked! Thank so much. Hope new version will be released soon!
skipper3k
Posts: 20
Joined: 22 Feb 2012, 09:21

Re: ios compilation problems

Postby skipper3k » 28 Feb 2012, 10:07

It works for me too ! Thank you for the effort and all the quick responses !
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: ios compilation problems

Postby Bax » 29 Feb 2012, 10:58

The updated version has been officially published on the SFS2X download page.
Paolo Bax
The SmartFoxServer Team

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 21 guests