I want to test out my app in low memory conditions. Previously my approach to this was running
[NSTimer scheduledTimerWithTimeInterval:2.0 target:[UIApplication sharedApplication] selector:@selector(_performMemoryWarning) userInfo:nil repeats:YES];
but it does not work anymore. And by working I mean the didReceiveMemoryWarning is not called. I've also tried:
[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object: [UIApplication sharedApplication]];
[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object: nil];
[[UIApplication sharedApplication] _performMemoryWarning];
But none of the above seem to work.
Any ideas would be appreciated