Support 2.x memory warning dispatch.
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Mar 2011 08:13:02 +0000 (01:13 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Mar 2011 08:13:02 +0000 (01:13 -0700)
MobileCydia.mm

index bee020a2236cf7f7506e42eefee12733d2933fbe..6daaf5b8a74ea06f6441b22054d3762ccaba2a44 100644 (file)
@@ -9726,7 +9726,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) _sendMemoryWarningNotification {
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveMemoryWarningNotification" object:[UIApplication sharedApplication]];
+    if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_0) // XXX: maybe 4_0?
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationMemoryWarningNotification" object:[UIApplication sharedApplication]];
+    else
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"UIApplicationDidReceiveMemoryWarningNotification" object:[UIApplication sharedApplication]];
 }
 
 - (void) _sendMemoryWarningNotifications {