【发布时间】:2015-05-27 08:25:20
【问题描述】:
刚才,我在 Xcode6.3.1 上创建了一个基于 Single View Application 的项目,然后我在 Main.storyboard 上创建了一个按钮。按键触摸时的代码是这样的:
NSString * bundleId = @"com.apple.iBooks";
void* sbServices = dlopen("/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices", RTLD_LAZY);
int (*SBSLaunchApplicationWithIdentifier)(CFStringRef identifier, Boolean suspended) = dlsym(sbServices, "SBSLaunchApplicationWithIdentifier");
const char *strBundleId = [bundleId cStringUsingEncoding:NSUTF8StringEncoding];
int result = SBSLaunchApplicationWithIdentifier((__bridge CFStringRef)bundleId, NO);
dlclose(sbServices);
但它没有工作。 然后我喜欢这个网站告诉我,Launch other application without URL schema in iphone? 它也没有工作。请帮我。 我的设备是 iPhone4s,iOS 7.1.2,越狱了。
【问题讨论】:
-
@creker - 感谢您的回答,但链接 stackoverflow.com/questions/14999658/… 可能无法解决我的问题
-
那你做错了什么。阅读权利,没有权利,代码将无法工作
-
我想知道如何配置权利