tags:

views:

137

answers:

1

Hi, using iphone SDk3.0, how does one prevent the iphone from sleeping so wifi remains on but still allow the screen to be dimmed(locked).

Disabling the idle timer is no good as that prevents screen lock and drains the battery really quick.

Thanks

A: 

You should put the UIRequiresPersistentWiFi key in your info.plist file. This will tell the system that your application needs the Wifi even if the screen is locked.

Without this key, the wifi will be shut down after some time.

Jasarien
I already have this key set, it does not prevent iphone sleeping which turns the wifi off. That key just appears to keep the wifi on when youre app is running.
tech74