onRemoveBuddy issue

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

Moderators: Lapo, Bax

Post Reply
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

onRemoveBuddy issue

Post by mmilen »

There is a issue with removing buddies. Stuff gets released when it should not . I have ARC project in Xcode 4.3.2. See the attached screen.
Debug for Zombie Objects is enabled.

This happens every time a buddy is removed.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: onRemoveBuddy issue

Post by rjgtav »

Hello.
Sorry but there is no screen attached. And what does get released?
Are you using the latest server patch (2.1.0) with the latest client API?
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.
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

I' using the latest release from May 24th. The issue was there with the previous framework release.

Before I have used the source code to compile the API and the issue was not there.

Enable Zombie Objects in XCODE.
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: onRemoveBuddy issue

Post by A51Integrated »

The SFS iOS API is not ARC compatible yet.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

Any estimate of when it would be? I do have a new project , that I would rather start straight with ARC as it seems Apple is going that way.
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: onRemoveBuddy issue

Post by A51Integrated »

We currently don't have an estimate for an ARC release. It really creates a lot of work maintaining two sets of code - even if the logic is identical. Our first priority at the moment is including all the features available in to the other APIs.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

Fair enough. I will see how it goes. So far that buddy thing seems to be the only issue. The code for the API used to be available. Can I get the latest one, it might something that can be quickly fixed and recompile the framework?
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

I have added some hacks to the code from Oct/November 2011, to improve background reconnection mechanism. And would love to use it with the latest framework build. The issue comes up due to sudden drop of WiFi or switch from WiFi to 3G for no apparent reason.
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: onRemoveBuddy issue

Post by A51Integrated »

You can easily add the same functionality to a project using the framework by listening for the onConnectionLost event and initiate a reconnection mechanism when the reason provided by the server is "unknown". Put the mechanism in a loop that runs three times, each after a specified time, and you have a solution.

It is not recommended to alter the API in any way as it renders it incompatible with future releases.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

I will try it that. Have you improved when onConnectionLost is fired? In past release the most common scenarios weren't handled and this is what I hacked. I had to add some connection drop check mechanics so that onConnectionLost is fired even when the server have no idea the device was disconnected or had switched connections.

Any how I will try it. And believe me I know that those hacks are pain to keep up with, but the projects I work are really fats track. And sometimes time I just don;t have the time to wait for certain fixes and I love how SFS is done.
mmilen
Posts: 311
Joined: 09 Nov 2010, 00:48
Contact:

Re: onRemoveBuddy issue

Post by mmilen »

I would really love to have a look at the Buddy issue, if I can have the source code.
Post Reply