0

When testing a VOIP or a background fetch application, testing against background termination and launch is vital to see if the desired outcome is achieved. Right now, launching 28 applications including five games doesn't show any applications being killed due to memory hogs. The five games are NBA GM, CEASAR SLOTS, STELLA WARS, CRASH DRIVE 2, WATER 2.

What needs to be checked is, if any applications get killed on low memory conditions. Any ideas on triggering that kind of condition?

(VOIP apps won't be killed if the socket is active, but why aren't any applications getting killed?)

Ravindranath Akila
  • 209
  • 3
  • 35
  • 45
  • 1
    There is a "Simulate Memory Warning" under hardware option in the simulator's menu. Application's `-applicationDidReceiveMemoryWarning:` & `UIViewController`'s `-didReceiveMemoryWarning` methods are used in this scenario. – staticVoidMan Feb 07 '14 at 05:58
  • Looks like a good approach to me. I wish a similar option was there on actual devices. Thanks @staticVoidMan! – Ravindranath Akila Feb 07 '14 at 10:33
  • this answer seems to do the trick on device -- [answer link](http://stackoverflow.com/a/8727632/2857130) – staticVoidMan Feb 07 '14 at 11:01
  • 1
    Possible duplicate of [iOS Development: How can I induce low memory warnings on device?](https://stackoverflow.com/questions/4717138/ios-development-how-can-i-induce-low-memory-warnings-on-device) – staticVoidMan Apr 08 '18 at 20:46

1 Answers1

0

If your goal is to test how the app recovers from sudden termination (as opposed to how it handles the termination) then the easiest way to kill the app is to stop the debugging session with xcode.

Just Build And Run while the app is running, and you get an instant recovery test.

Erwin
  • 555
  • 6
  • 8