iPhone Simulator Should Allow Changing Battery Level/State

Originator:SlaunchaMan
Number:rdar://14546919 Date Originated:25-Jul-2013 10:29 AM
Status:Insufficient information Resolved:
Product:iPhone SDK Product Version:6.1
Classification:UI/Usability Reproducible:Always
 
Summary:
Debugging an app that behaves differently depending on the battery state or battery level is difficult, especially for battery state, since the device must be plugged in to debug it.

Steps to Reproduce:
1. Write code that depends on a specific battery state or battery level where the state is not "Charging" or "Full."
2. Try to execute that code on the device while attached to the debugger.
3. Give up, then write code that modifies the UI of your app to confirm what it’s doing.

Expected Results:
I should be able to debug this code.

Actual Results:
The device can’t be debugged when the power is disconnected, and the iOS Simulator doesn’t support modifying those states, either.

Regression:
Battery level and state monitoring has been available since iOS 3.0, so since then.

Notes:
Being able to modify the values via a menu in the iOS Simulator would be an effective way of solving this problem. Currently the Simulator reports a power state of "unknown."

Comments

Related request: ability to disable charging over the USB cable that the iPhone is connected to.

You can use NSLogger to do wireless remote logging (but not debugging, unfortunately).


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!