- fprintf(stderr, "notify_post(com.apple.mobile.springboard_teardown)\n");
- notify_post("com.apple.mobile.springboard_teardown");
+ // 600 is being used to approximate 4.x/5.x boundary
+ if (kCFCoreFoundationVersionNumber < 600) {
+ fprintf(stderr, "notify_post(com.apple.mobile.springboard_teardown)\n");
+ notify_post("com.apple.mobile.springboard_teardown");
+ } else {
+ // XXX: this code is preferable to launchctl unoad but it requires libvproc? :(
+ //vproc_err_t *error = _vproc_send_signal_by_label(label, VPROC_MAGIC_UNLOAD_SIGNAL);
+ //_assert(error == NULL, "_vproc_send_signal_by_label(UNLOAD) != NULL");
+
+ fprintf(stderr, "launchctl unload SpringBoard.plist\n");
+ system("launchctl unload " SpringBoard_plist);
+ }