I know that on iOS 4, the Wi-Fi connection used to be persistent, so going into sleep mode/locked kept the connection ON .
This was modified in the next version iOS 5 to improve battery life.
In iOS 5 , requiring the device to be plugged into a power source in order to have a persistent Wi-Fi connection.
Wi-Fi connection is disconnecting automatically after iPad is going into sleep mode/locked .
Here comes my problem, I’m sending a bulk chunk of data through WiFi which may take too much time. So the user have to wait up to the transaction complete.
iPad may switch into sleep mode/locked while sending process took more time which will result the WiFi connection error.
Now i have set the UIRequiresPersistentWiFi to YES in info.plist. However same network issue happened again.
I would like to keep/persistent the WiFi Connection active even iPad is going into sleep mode/locked in iOS5. So is there any alternatives to achieve this.
Thanks.
Phew… Finally I got a solution with
idleTimerDisabled.Its a Boolean value that controls whether the idle timer is disabled for the application .
Its the way to prevent the iPad from sleeping while my application is running.
The default value of this property is
NO. When most applications have no touches as user input for a short period, the system puts the device into a “sleep” state where the screen dims.This is done for the purposes of conserving power. However, applications that don’t have user input except for the accelerometer—games, for instance—can, by setting this property to
YES, disable the “idle timer” to avert system sleep.I just set the value to
YESwhile I’m sending a bulk chunk of data through WiFi and have set the value toNOwhen the process is completed.Example:
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];Note: Be sure to reset this property to NO when your app does not need to prevent screen locking.
You can see more details here