我使用下面的代码:iPhone 5应用程序启动另一个应用程序
int (*openApp)(CFStringRef, Boolean);
void* sbServices = dlopen("/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices", RTLD_LAZY);
openApp= (int(*)(CFStringRef, Boolean))dlsym(sbServices,"SBSLaunchApplicationWithIdentifier");
openApp(CFSTR("com.apple.mobilephone"), FALSE);
dlclose(sbServices);
这是在模拟器上工作正常,但在设备上它给以下错误:
com.apple.springboard.launchapplications required to use kern_return_t _SBXXLaunchApplication(mach_port_t, char *, sbs_url_string_t, sbs_property_list_data_t, mach_msg_type_number_t, sbs_property_list_data_t, mach_msg_type_number_t, SBSApplicationLaunchFlags, SBSApplicationLaunchError *, audit_token_t)
有什么解决上述问题?