首页 > 解决方案 > 如何使用 THEOS 将重启按钮添加到我的调整中

问题描述

嗨,我需要帮助才能在我的调整的首选项包中添加一个重新启动按钮。我在我的tweakRootListController.m 中有这个

-(void)reboot { [[UIApplication sharedApplication] reboot]; return; }

但是当我尝试编译项目时,它返回给我一个错误

MacBook-Pro-de-Valentin:respringx valentincocq$ make package install Making all for bundle RespringX… ==> Copying resource directories into the bundle wrapper… ==> Compiling respringRootListController.m (arm64)… respringRootListController.m:20:40: error: 'UIApplication' may not respond to 'reboot' [-Werror] [[UIApplication sharedApplication] reboot]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 1 error generated. make[3]: *** [/Users/valentincocq/respringx/.theos/obj/debug/arm64/respringRootListController.m.5460b32b.o] Error 1 make[2]: *** [/Users/valentincocq/respringx/.theos/obj/debug/arm64/RespringX.bundle/RespringX] Error 2 make[1]: *** [internal-bundle-all_] Error 2 make: *** [RespringX.all.bundle.variables] Error 2 MacBook-Pro-de-Valentin:respringx valentincocq$

我试过这个,但也不行:

-(void)reboot { system("reboot"); }

谢谢你的帮助。

标签: macosjailbreakreboottheos

解决方案


推荐阅读