Terminating app due to uncaught exception 'SFSException', reason: 'User should be joined in a room in order to send a public message'
The situation is most likely for two players at the same location (home):
players were joined in a table.
players left the iPads for long period of time.
naturally the iPad locks it self after a while and after a little longer it will turn WiFi off.
Now both users are disconnected from the server.
One player turns on the iPad and tries to send a publicMessage. App Crashes with the above error.
Application Crash after long inactivity
- A51Integrated
- Posts: 240
- Joined: 03 Jan 2012, 19:55
- Location: Toronto, Canada
- Contact:
Re: Application Crash after long inactivity
You should use the applicationDidBecomeActive: method to check for connectivity first. Once in the background, the app stops executing code and it's connection to SFS will be lost. Because it doesn't execute code, there's no way for it to react to a lost connection. So the best way to work around the issue is the have some logic in applicationDidBecomeActive: that either reconnects the user to the last known zone and room or alert the user that they have been disconnected.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
http://a51integrated.com / +1 416-703-2300
Re: Application Crash after long inactivity
Definitely I have no problem handling the comeback from background. Never the less SFSclient should send some general onErrorAlert, rather than just crash the app. The older source Code base API does not crash the app.
- A51Integrated
- Posts: 240
- Joined: 03 Jan 2012, 19:55
- Location: Toronto, Canada
- Contact:
Re: Application Crash after long inactivity
Verified and fixed. Will also be included in next release. Thanks.
- A51Integrated
- Posts: 240
- Joined: 03 Jan 2012, 19:55
- Location: Toronto, Canada
- Contact:
Re: Application Crash after long inactivity
Update has been released (v1.07): http://www.smartfoxserver.com/download/sfs2x#p=updates
Re: Application Crash after long inactivity
Thank you very much. Will let you know if something else comes up.
Return to “SFS2X iPhone / iPad / OSX API”
Who is online
Users browsing this forum: No registered users and 55 guests