diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-31 15:23:25 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-10-31 16:17:40 +0000 |
commit | 73b6bd3c3bfaa9fafbb3ab511cdd89f5ccddee46 (patch) | |
tree | 9474690b0e4c9555b44e1434d9b7eb7dc2e25f95 | |
parent | c3311f6c8a8b7cf327dcd23fa120c7e72273fbcf (diff) |
Merge iOS 8 compatible uicache code from limneos.
-rw-r--r-- | uicache.mm | 12 | ||||
-rw-r--r-- | uicache.xml | 12 |
2 files changed, 21 insertions, 3 deletions
@@ -86,6 +86,15 @@ int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + Class $LSApplicationWorkspace(objc_getClass("LSApplicationWorkspace")); + LSApplicationWorkspace *workspace($LSApplicationWorkspace == nil ? nil : [$LSApplicationWorkspace defaultWorkspace]); + + if ([workspace respondsToSelector:@selector(_LSPrivateRebuildApplicationDatabasesForSystemApps:internal:user:)]) { + if (![workspace _LSPrivateRebuildApplicationDatabasesForSystemApps:YES internal:YES user:NO]) + fprintf(stderr, "failed to rebuild application databases"); + return 0; + } + bool respring(false); NSString *home(NSHomeDirectory()); @@ -100,9 +109,6 @@ int main(int argc, const char *argv[]) { system("killall lsd"); - Class $LSApplicationWorkspace(objc_getClass("LSApplicationWorkspace")); - LSApplicationWorkspace *workspace($LSApplicationWorkspace == nil ? nil : [$LSApplicationWorkspace defaultWorkspace]); - if ([workspace respondsToSelector:@selector(invalidateIconCache:)]) while (![workspace invalidateIconCache:nil]) sleep(1); diff --git a/uicache.xml b/uicache.xml index c91640f..9a34f2b 100644 --- a/uicache.xml +++ b/uicache.xml @@ -5,5 +5,17 @@ <array> <string>InstallForLaunchServices</string> </array> + + <key>com.apple.lsapplicationworkspace.rebuildappdatabases</key> + <true/> + + <key>com.apple.private.MobileContainerManager.allowed</key> + <true/> + + <key>com.apple.private.kernel.override-cpumon</key> + <true/> + + <key>com.apple.vpn.installer_events</key> + <true/> </dict> </plist> |