Memory warning can be produced by calling an private method of UIApplication. It works fine on iOS 6.1 and below
[[UIApplication sharedApplication]performSelector:@selector(_performMemoryWarning)];
NOTE: Remove that selector call before submitting app to iTunes, otherwise it will be rejected.