iOS如何使用私有API中的UIApplication launchApplicationWithIdentifier?
[编辑]我已安装了我的设备。我在Github上找到了最新的私有API 我想在我的应用程序中使用私有API 我在github上找到了,但它只支持iOS 3.x。当我在iOS 5.0.1上工作时 我还发现了谷歌iPhone开发工具。但这真的让我困惑。我对iPhone开发还不熟悉 我应该怎样使用它iOS如何使用私有API中的UIApplication launchApplicationWithIdentifier?,ios,jailbreak,uiapplication,iphone-privateapi,Ios,Jailbreak,Uiapplication,Iphone Privateapi,[编辑]我已安装了我的设备。我在Github上找到了最新的私有API 我想在我的应用程序中使用私有API 我在github上找到了,但它只支持iOS 3.x。当我在iOS 5.0.1上工作时 我还发现了谷歌iPhone开发工具。但这真的让我困惑。我对iPhone开发还不熟悉 我应该怎样使用它 [[UIApplication sharedApplication] launchApplicationWithIdentifier:@"com.a.b" suspended:NO]; 有人可以给我一个方
[[UIApplication sharedApplication] launchApplicationWithIdentifier:@"com.a.b" suspended:NO];
有人可以给我一个方向或一些例子。非常感谢。要求
launchApplicationWithIdentifier:suspended:
是私有API,因此您需要显式声明它才能构建应用程序。只需在适当位置添加以下代码即可:
4) 构建您的项目
5) 将YourProject.app复制到设备的/Application文件夹中(例如,通过SFTP)
6) 响应或重新启动设备
7)
8) 利润
另见
-另一种解决方案
我已经安装了我的设备。我将此密钥添加到/Supporting Files/myAppName-Info.plist,然后构建它。我和以前一样收到了消息。实例消息的接收器类型“UIApplication”未声明具有选择器“launchApplicationWithIdentifier:suspended:”的方法。不在info.plist中。在权利方面。另外,请检查我的UPD,还有另一个解决方案可能会有所帮助。我正在使用iOS 5和Xcode 4.2。官方文件称,自iOS4以来,不再需要equalifications.plist。所以我不知道应该在哪里找到这个文件并添加这些行。但是在shell中使用'codesign-d--authentications-xxxx/Build/Products/Debug iphoneos/MyApp.app',我可以看到authentications.plist。我对iOS开发真的很陌生。很抱歉现在我正试着用你的UPD。但是使用“launchApplicationWithIdentifier”,项目仍然无法成功编译。谢谢。我在XCode 4中添加了如何为您的项目添加权限的信息。是的,权利不是必需的,因为XCode在某些情况下仍然需要。我认为它们对iCloud很有用,但我不确定。希望你能成功,无论是采用那种解决方案还是其他解决方案。无论如何,我会检查我的解决方案(星期一)。
// Simply make declaration inside a Category.
#import "BlahBlah.h"
@interface UIApplication (Undocumented)
- (void) launchApplicationWithIdentifier: (NSString*)identifier suspended: (BOOL)suspended;
@end
....
@implementation BlahBlah
...