summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2020-05-24 09:29:59 -1000
committerSam Bingner <sam@bingner.com>2020-05-27 22:49:06 -1000
commitf4a62caae823f84f0b55a9a57de94f174584f00e (patch)
tree7714f8240666f849b406fa48125e37331816b7f0
parent28c1a7192150a3dd46f7e5ef0e4fa2320c903ad3 (diff)
tvOS Supportv1.1.18
-rw-r--r--uicache.mm33
1 files changed, 30 insertions, 3 deletions
diff --git a/uicache.mm b/uicache.mm
index 0b972aa..d765814 100644
--- a/uicache.mm
+++ b/uicache.mm
@@ -68,6 +68,27 @@
#include "csstore.hpp"
+#if TARGET_OS_IPHONE
+#define FRONTBOARD "SpringBoard"
+#define FRONTBOARD_ID "com.apple.SpringBoard"
+#elif TARGET_OS_TV
+#define FRONTBOARD "PineBoard"
+#define FRONTBOARD_ID "com.apple.PineBoard"
+
+@interface PBSSystemService : NSObject
++(id)sharedInstance;
+-(void)relaunchBackboardd;
+@end
+
+@interface PBSSystemServiceConnection : NSObject
++(id)sharedConnection;
+-(id)systemServiceProxy;
+@end
+
+#else
+#error "Unsupported target OS"
+#endif
+
@interface NSMutableArray (Cydia)
- (void) addInfoDictionary:(NSDictionary *)info;
@end
@@ -310,7 +331,7 @@ int standard_uicache(void)
NSString *home(NSHomeDirectory());
NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]);
- system("killall -SIGSTOP SpringBoard");
+ system("killall -SIGSTOP " FRONTBOARD);
sleep(1);
@try {
@@ -424,7 +445,7 @@ int standard_uicache(void)
system("killall installd");
} @finally {
- system("killall -SIGCONT SpringBoard");
+ system("killall -SIGCONT " FRONTBOARD);
}
notify_post("com.apple.mobile.application_installed");
@@ -652,6 +673,7 @@ int main(int argc, const char *argv[])
}
if ( respring )
{
+#if TARGET_OS_IPHONE
pid_t sb_pid = launch_get_job_pid("com.apple.SpringBoard");
if ($SBSRelaunchAction && $FBSSystemService) {
id action = [$SBSRelaunchAction actionWithReason:@"respring" options:RestartRenderServer targetURL:nil];
@@ -664,9 +686,14 @@ int main(int argc, const char *argv[])
usleep(1000);
}
} else {
- system("launchctl stop com.apple.SpringBoard");
+ system("launchctl stop " FRONTBOARD_ID);
system("launchctl stop com.apple.backboardd");
}
+#elif TARGET_OS_TV
+ [[[PBSSystemServiceConnection sharedConnection] systemServiceProxy] relaunchBackboardd];
+#else
+#error "Unsupported target OS"
+#endif
}
} // @autoreleasepool
return rv;