wyp*_*wyp 4 jailbreak iphone-privateapi uiapplication ios
[EDIT]我已将我的设备装上。我在Github上找到了最新的私有API iOS-Runtime-Headers。
我想在我的应用中使用私有API。
我在github上找到了kennytm / iphone-private-frameworks,但它仅支持iOS3.x。当我在iOS 5.0.1上工作时。
我还在Google iPhone开发工具上找到了一些代码。但这确实让我感到困惑。我是iPhone开发的新手。
我应该怎么用
[[UIApplication sharedApplication] launchApplicationWithIdentifier:@"com.a.b" suspended:NO];
Run Code Online (Sandbox Code Playgroud)
有人可以给我一个方向或一些例子。非常感谢。
1)在XCode项目中启用权利。
要将权利添加到项目中,请在项目导航器中选择项目,然后在活动的目标-> 摘要 -> 权利 ->选中启用权利复选框。名称为“ YourProject.entitlements ”的新文件将立即显示在项目导航器中。
2)将以下属性添加到“权利”中。

3)由于launchApplicationWithIdentifier:suspended:是私有API,因此您需要显式声明它以构建您的应用程序。只需在适当的地方添加以下代码:
// Simply make declaration inside a Category.
#import "BlahBlah.h"
@interface UIApplication (Undocumented)
- (void) launchApplicationWithIdentifier: (NSString*)identifier suspended: (BOOL)suspended;
@end
....
@implementation BlahBlah
...
Run Code Online (Sandbox Code Playgroud)
4)建立您的项目。
5)将YourProject.app复制到设备的/ Application文件夹中(例如,通过SFTP)
6)Respring或重新引导的iDevice。
7)...
8)利润!
特殊的API从我的应用程序启动应用 - 另一种解决方案
| 归档时间: |
|
| 查看次数: |
4543 次 |
| 最近记录: |