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());
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);
<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>