]> git.saurik.com Git - uikittools.git/commitdiff
Merge iOS 8 compatible uicache code from limneos.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 31 Oct 2014 15:23:25 +0000 (15:23 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 31 Oct 2014 16:17:40 +0000 (16:17 +0000)
uicache.mm
uicache.xml

index cbf3b8e00b58c84506d1db640219d57fa67db821..2eafcddc9702062c8d0b4f77cd981ca66ac966f6 100644 (file)
 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);
index c91640f72d27c6655b160080edc17738ec4e711f..9a34f2b4adae0e74600b38830c56a07e68e5df8d 100644 (file)
@@ -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>