4 ms·
Is there a tool that lets you trigger some of these state changes (Suspended -> Killed, for example) for debugging/testing purposes? Trying to get the OS to for
by swanson 15y ago
Is there a tool that lets you trigger some of these state changes (Suspended -> Killed, for example) for debugging/testing purposes? Trying to get the OS to forcibly kill an app due to memory pressure is something I've had trouble doing on Android and seems like it could be a problem on iOS also.
- jkubicek 15y agoThe simulator can simulate a low-memory warning. To simulate an app being killed, just kill the app from Xcode.
- gavingmiller 15y agoThe key word there is simulate. There are cases (see my response) that arise that purposely triggering these state changes could really help with.
- giesti 15y agoYou could try to write a very simple app to run in background and waste memory on purpose (e.g. creating some shit in a loop) if you really needda replicate such a scenario w/o emulation. In my experience, as usually you can get away with ~30mb of "wasted" memory per each instance before iOS kills the daemon. So just launch a couple of those and enjoy.
- gavingmiller 15y agoI'm in this situation currently and would love a point in the right direction if anyone has one. My app loses the user's "current location", reports 0,0 from gps, and won't pick up a new current location unless the app is killed. Using the simulator's memory warning doesn't trigger the issue, only sitting on the device causes the problem to surface.