【发布时间】:2013-11-06 21:42:39
【问题描述】:
我正在处理锁屏调整。在我的自定义锁屏视图中,有一个按钮,您可以使用它来锁定和打开本机手机应用程序。我使用的 IDE 是 iOSOpenDev。
这些方法我都试过了:
网址方案:不想表盘显示,所以放弃了。
SBSLaunchApplicationWithIdentifier。这是最流行的方法,像这样:
void* sbServices = dlopen("/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices", RTLD_LAZY);
int (*SBSLaunchApplicationWithIdentifier)(CFStringRef identifier, Boolean suspended) =
dlsym(sbServices, "SBSLaunchApplicationWithIdentifier");
int result = SBSLaunchApplicationWithIdentifier((CFStringRef)bundleId, false);
dlclose(sbServices);
但是在 .xm 文件中,编译器会告诉我
无法使用“void *”类型的右值初始化“int (*)(CFStringRef, Boolean)”类型的变量。
我该怎么做? 谢谢!
【问题讨论】:
标签: ios objective-c jailbreak iphone-privateapi tweak