Search code examples
iosxcodejailbreakiphone-privateapi

Launch other application without URL schema in iphone?


I know that other applications can call from your application via the URL schema. But not all applications are registered schema URL. So how can I launch that application?. I'm developing for iphone jaibroken.


Solution

  • I used this way:

    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);
    

    And you need entitlements granted to your app:

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

    It can run on iOS 6.