summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-07-30 10:06:49 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-07-30 10:06:49 +0000
commit7e0ec87a1c6cc62738348fe93656b5a4d81633a3 (patch)
tree3abf7640ffd51f8592d9b239efe6d817d2b41ee4
parent250ccb19b3104102d52a65de0065f6afaf2fc1a5 (diff)
Delete the icon caches.
-rw-r--r--control2
-rw-r--r--uicache.mm14
2 files changed, 14 insertions, 2 deletions
diff --git a/control b/control
index bc6448d..029866b 100644
--- a/control
+++ b/control
@@ -4,7 +4,7 @@ Section: Utilities
Installed-Size: %S
Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
Architecture: iphoneos-arm
-Version: 1.0.3198-1
+Version: 1.0.3201-1
Description: UIKit/GraphicsServices command line access
Name: UIKit Tools
Author: Jay Freeman (saurik) <saurik@saurik.com>
diff --git a/uicache.mm b/uicache.mm
index 4b477c6..cf88535 100644
--- a/uicache.mm
+++ b/uicache.mm
@@ -37,7 +37,8 @@
int main() {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", NSHomeDirectory()]);
+ NSString *home(NSHomeDirectory());
+ NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]);
Class $LSApplicationWorkspace(objc_getClass("LSApplicationWorkspace"));
LSApplicationWorkspace *workspace($LSApplicationWorkspace == nil ? nil : [$LSApplicationWorkspace defaultWorkspace]);
@@ -84,6 +85,17 @@ int main() {
fprintf(stderr, "%s\n", error == nil ? strerror(errno) : [[error localizedDescription] UTF8String]);
} else fprintf(stderr, "cannot open cache file. incorrect user?\n");
+ unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-icons"] UTF8String]);
+ unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-icons.plist"] UTF8String]);
+
+ unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-smallicons"] UTF8String]);
+ unlink([[NSString stringWithFormat:@"%@/Library/Caches/com.apple.springboard-imagecache-smallicons.plist"] UTF8String]);
+
+ system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/SpringBoardIconCache"] UTF8String]);
+ system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/SpringBoardIconCache-small"] UTF8String]);
+
+ system([[NSString stringWithFormat:@"rm -rf %@/Library/Caches/com.apple.IconsCache"] UTF8String]);
+
notify_post("com.apple.mobile.application_installed");
[pool release];