I run into a headache with iPhoenClient connection management.
I'm running latest RC2b server with zone User Reconnection Time Frame = 0 seconds.
on iPhone 4.
1. start the app connect and login. I can see the user on the server
2. send the app to background
3. Lock screen (using power button)
Right here I can see the client disappearing from the server.
4. Unlock screen call the application back on the screen and surprise the client isConnected is TRUE.
What is going on.
iPhoneClient connection management.
- cemuzunlar
- Posts: 47
- Joined: 26 Dec 2008, 00:45
- Contact:
The sleep and wake-up events can only be handled in your app delegate. There is no way for us to handle that event.
So, it is your responsibility to watch for that events and take appropriate action, in that case destroy/recreate the SFS object.
Please check this:
"One of the main jobs of the application delegate is to track the state transitions the application goes through while it is running. Prior to iOS 4.0, applications were either active, inactive, or not running. In iOS 4.0 and later, applications can also be running in the background or suspended. All of these transitions require a response from your application to ensure that it is doing the right thing. For example, a background application would need to stop updating its user interface. You provide the response to these transitions using the methods of the application delegate."
[url=http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate]UIApplicationDelegate Protocol Reference[/url]
We'll test the system again anyway to see if there is anything we can do.
So, it is your responsibility to watch for that events and take appropriate action, in that case destroy/recreate the SFS object.
Please check this:
"One of the main jobs of the application delegate is to track the state transitions the application goes through while it is running. Prior to iOS 4.0, applications were either active, inactive, or not running. In iOS 4.0 and later, applications can also be running in the background or suspended. All of these transitions require a response from your application to ensure that it is doing the right thing. For example, a background application would need to stop updating its user interface. You provide the response to these transitions using the methods of the application delegate."
[url=http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate]UIApplicationDelegate Protocol Reference[/url]
We'll test the system again anyway to see if there is anything we can do.
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
I do agree with all you have said, but never the less I have to get some indication from the SFSClient of it's state.
If you just send the app to the background and do not lock the screen the connection never gets dropped and once the app is called to foreground it continues working as a charm. However if the screen is locked when the app is minimized the client disconnects but it never shows it in it's isConnected state. It is very hard for my application code to know the state of it's connection if the SFSClient does not know that either.
If you just send the app to the background and do not lock the screen the connection never gets dropped and once the app is called to foreground it continues working as a charm. However if the screen is locked when the app is minimized the client disconnects but it never shows it in it's isConnected state. It is very hard for my application code to know the state of it's connection if the SFSClient does not know that either.
- cemuzunlar
- Posts: 47
- Joined: 26 Dec 2008, 00:45
- Contact:
Return to “SFS2X iPhone / iPad / OSX API”
Who is online
Users browsing this forum: No registered users and 28 guests