Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在iphone中启动没有URL架构的其他应用程序?_Ios_Xcode_Jailbreak_Iphone Privateapi - Fatal编程技术网

Ios 在iphone中启动没有URL架构的其他应用程序?

Ios 在iphone中启动没有URL架构的其他应用程序?,ios,xcode,jailbreak,iphone-privateapi,Ios,Xcode,Jailbreak,Iphone Privateapi,我知道其他应用程序可以通过URL模式从您的应用程序调用。但并非所有应用程序都是注册的架构URL。那么如何启动该应用程序呢?。 我正在为iphone Jaibruke开发。有几种方法可以使用Bundle ID启动应用程序 SBS应用程序 应用控制器 我在4.x和sbler中使用了另一种方法,但它在5.0中停止工作,所以我不打算发布它。我使用这种方法: void* sbServices = dlopen("/System/Library/PrivateFrameworks/SpringBoardSe

我知道其他应用程序可以通过URL模式从您的应用程序调用。但并非所有应用程序都是注册的架构URL。那么如何启动该应用程序呢?。
我正在为iphone Jaibruke开发。

有几种方法可以使用Bundle ID启动应用程序

SBS应用程序 应用控制器 我在4.x和
sbler中使用了另一种方法,但它在5.0中停止工作,所以我不打算发布它。

我使用这种方法:

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);
您需要为您的应用程序授予权利:

 <key>com.apple.springboard.launchapplications</key>
 <true/>
com.apple.springboard.launchapplications

它可以在iOS 6上运行。

据我所知,只有私有api才能做到这一点。首先

@interface PrivateApi_LSApplicationWorkspace
- (bool)openApplicationWithBundleID:(id)arg1;
@end
然后使用它

PrivateApi_LSApplicationWorkspace* _workspace;
_workspace = [NSClassFromString(@"LSApplicationWorkspace") new];
[_workspace openApplicationWithBundleID:bundleIdentifier];

您可以检查。

我刚刚测试过:在iOS 9.3.5和11.2中工作,而且此方法不需要任何包含或动态加载libs。完全依赖于obj-c运行时。而且这种方法不需要越狱设备,可以使用xcode设备和免费的开发人员帐户进行配置。不要认为它会通过应用商店审查过程,但可以成功地用于企业或临时分发等

id wrkS;
wrkS = [NSClassFromString(@"LSApplicationWorkspace")  performSelector:@selector(defaultWorkspace)];
[wrkS performSelector:@selector(openApplicationWithBundleID:) withObject:@"com.apple.reminders"];

我当时也试过上面的方法。但对于IOS来说,5x不起作用。您已经找到了一种在IOS 5x上启动应用程序的方法,这非常好。你能给我指点方向吗?谢谢你的工作。你只是做得不对。我在Cydia上的一些调整中使用了这个代码。在Notification Center调整或MobileSubstrate调整中使用这个代码。如果您试图在应用程序中使用它,则需要对基板进行调整以从应用程序调用。仅供参考
-[SBUIController activateApplicationFromSwitcher:
也适用于iOS6。在iOS5中,我使用了
-[SpringBoard applicationOpenURL:publicURLsOnly:
传递
doubletap://display-identifier
但不再支持此架构。如果您的代码不在通知中心或移动基板调整(WrightCS的应答地址)中,然后,您可以告诉use如何获取API SBSLaunchApplicationWithIdentifier的param?@user501836您应该提供的参数
PrivateApi_LSApplicationWorkspace* _workspace;
_workspace = [NSClassFromString(@"LSApplicationWorkspace") new];
[_workspace openApplicationWithBundleID:bundleIdentifier];
id wrkS;
wrkS = [NSClassFromString(@"LSApplicationWorkspace")  performSelector:@selector(defaultWorkspace)];
[wrkS performSelector:@selector(openApplicationWithBundleID:) withObject:@"com.apple.reminders"];