Search found 240 matches

by A51Integrated
22 Mar 2013, 11:45
Forum: SFS2X iPhone / iPad / OSX API
Topic: Bundling the OSX API with the compiled app
Replies: 5
Views: 8769

Re: Bundling the OSX API with the compiled app

Sure. Assuming the SFS framework is already linked to the project (or any 3rd party framework for that matter), simply go to your projects Build Phases and add the framework to the "Copy Bundle Resources" section. That will actually copy the framework into your compiled app. See the Apple ...
by A51Integrated
03 Mar 2013, 12:36
Forum: SFS2X iPhone / iPad / OSX API
Topic: Can't decode an SFSObject. Byte data is insufficient
Replies: 13
Views: 20735

Re: Can't decode an SFSObject. Byte data is insufficient

1. How can we make sure that these errors are not happening anymore? If these exceptions are forcing us to quit the application, we want to know why we are getting these errors. As mentioned above, it's a volume issue. The device simply can't handle the amount of communications back and forth. You'...
by A51Integrated
01 Mar 2013, 15:41
Forum: SFS2X iPhone / iPad / OSX API
Topic: smartfox buddies mechanism
Replies: 12
Views: 17361

Re: smartfox buddies mechanism

This may be cause by the way you're adding buddies from an extension as apposed to the traditional method. Make certain that you are replicating the exact SFS series of events when adding a buddy on the back end.
by A51Integrated
27 Feb 2013, 15:06
Forum: SFS2X iPhone / iPad / OSX API
Topic: smartfox buddies mechanism
Replies: 12
Views: 17361

Re: smartfox buddies mechanism

Try to only retrieve the entire BuddyList once - it can grow rather large. Once retrieved, store it locally on the client and listen for events to update your local copy. By retrieving the entire buddy list for each call, you're wasting a lot of bandwidth and using unnecessary resources.
by A51Integrated
26 Feb 2013, 16:27
Forum: SFS2X iPhone / iPad / OSX API
Topic: smartfox buddies mechanism
Replies: 12
Views: 17361

Re: smartfox buddies mechanism

Make sure your data types are correct for your NSLog statements.

Yes, in your scenario, A would not get B's updates.
by A51Integrated
22 Feb 2013, 18:58
Forum: SFS2X iPhone / iPad / OSX API
Topic: smartfox buddies mechanism
Replies: 12
Views: 17361

Re: smartfox buddies mechanism

See the docs here: http://docs2x.smartfoxserver.com/api-docs/objc-doc/Classes/SFSBuddy.html#//api/name/getOnlineVariables It's very similar to retrieving User or Room variables. Use the buddy object and call the getOnlineVariables or getOfflineVariables method to retrieve an array. Then iterate thro...
by A51Integrated
22 Feb 2013, 15:30
Forum: SFS2X iPhone / iPad / OSX API
Topic: smartfox buddies mechanism
Replies: 12
Views: 17361

Re: smartfox buddies mechanism

Buddy variables and User variables are two separate things. User variables are attached to the user. If you have the user object, you can iterate through the User variables, see: http://docs2x.smartfoxserver.com/api-docs/objc-doc/Protocols/UserVariable.html Buddy variables are attached to a buddy, s...
by A51Integrated
21 Feb 2013, 17:55
Forum: SFS2X iPhone / iPad / OSX API
Topic: Is it possible to check if user already logged in?
Replies: 2
Views: 6153

Re: Is it possible to check if user already logged in?

You can achieve that in a number of ways. After login (not connection), the client will be assigned a SFS id and have a user object created. So one can always use [client mySelf] and see if that is a valid user (http://docs2x.smartfoxserver.com/api-docs/objc-doc/Classes/SmartFox2XClient.html#//api/n...
by A51Integrated
20 Feb 2013, 19:38
Forum: SFS2X iPhone / iPad / OSX API
Topic: Can't decode an SFSObject. Byte data is insufficient
Replies: 13
Views: 20735

Re: Can't decode an SFSObject. Byte data is insufficient

It's not really SFS where the error happens - that's where it's thrown. What the API is trying to do is read a packet, and because the packet is incomplete, it throws the exception. So it works as expected.
by A51Integrated
20 Feb 2013, 16:05
Forum: SFS2X iPhone / iPad / OSX API
Topic: Can't decode an SFSObject. Byte data is insufficient
Replies: 13
Views: 20735

Re: Can't decode an SFSObject. Byte data is insufficient

OK. From Apple: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Exceptions/Articles/ExceptionsAndCocoaFrameworks.html#//apple_ref/doc/uid/TP40009045-SW1 The Cocoa frameworks are generally not exception-safe. The general pattern is that exceptions are reserved for programmer er...
by A51Integrated
20 Feb 2013, 15:27
Forum: SFS2X iPhone / iPad / OSX API
Topic: Can't decode an SFSObject. Byte data is insufficient
Replies: 13
Views: 20735

Re: Can't decode an SFSObject. Byte data is insufficient

Try it in your main around the SmartFox2XClient instance and let me know. Although I think you may be right. By the time the exception is thrown, it would have killed the chance of capturing the event outside of the API.

Let me do some tests on this end and see what I can find.
by A51Integrated
20 Feb 2013, 15:15
Forum: SFS2X iPhone / iPad / OSX API
Topic: what's the SFSCodecException?
Replies: 5
Views: 207828

Re: what's the SFSCodecException?

See my response here: viewtopic.php?f=21&t=15279#p64486

Basically, you'll need to reduce traffic and there are number of ways to achieve this, but by far the most important will be your game architecture.
by A51Integrated
19 Feb 2013, 21:53
Forum: SFS2X iPhone / iPad / OSX API
Topic: Can't decode an SFSObject. Byte data is insufficient
Replies: 13
Views: 20735

Re: Can't decode an SFSObject. Byte data is insufficient

Have you tried something like: #import "SFSCodecException.h" @try { // do something that might throw an exception } @catch (SFSCodecException *ex) { // deal with the exception } @finally { // optional block of clean-up code // executed whether or not an exception occurred }
by A51Integrated
19 Feb 2013, 21:49
Forum: SFS2X iPhone / iPad / OSX API
Topic: what's the SFSCodecException?
Replies: 5
Views: 207828

Re: what's the SFSCodecException?

The binary header of the message is unreadable. This is typically caused by an overloaded connection, when the client device simply can't get the entire binary message.

Go to advanced search