REQUIREMENTS
- Jailbroken iDevice
- Valid certificates/keys in your keychain and its associated provisioning profile. (If you aren't enrolled in the apple developer program, use this workaround: self sign my code and test on iphone in xCode)
MY SOLUTION
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!
SEE ALSO
Special API to launch an app from my application - another solution
What is the bundle identifier of apple's default applications in iOS?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…