[EDIT]I've jb my device. And I found the latest private APIs iOS-Runtime-Headers on Github.
I want to use private APIs in my app.
I found kennytm/iphone-private-frameworks on github but it only support iOS 3.x. While I'm working on iOS 5.0.1.
I also found some codes on Google iPhone development tools. But it really make me confused. I'm new to iPhone development.
What should I do to use
[[UIApplication sharedApplication] launchApplicationWithIdentifier:@"com.a.b" suspended:NO];
Someone can give me a direction or some examples. Thanks a lot.
1) Enable Entitlements in your XCode project.
To add Entitlements to your project, select your project in project navigator, then on active Target -> Summary -> Entitlements -> check Enable entitlements check box. New file with name "YourProject.entitlements" would appear in project navigator right after.
2) Add folowing property to Entitlements.
3) Since launchApplicationWithIdentifier:suspended:
is private API, you need to explicitly declare it in order to build your app. Just add folowing code in appropriate place(s):
// Simply make declaration inside a Category.
#import "BlahBlah.h"
@interface UIApplication (Undocumented)
- (void) launchApplicationWithIdentifier: (NSString*)identifier suspended: (BOOL)suspended;
@end
....
@implementation BlahBlah
...
4) Build your project.
5) Copy YourProject.app into device's /Application folder (via SFTP, for example)
6) Respring or reboot iDevice.
7) ...
8) Profit!
Special API to launch an app from my application - another solution
What is the bundle identifier of apple's default applications in iOS?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With