0
 NSInteger error = SBSLaunchApplicationWithIdentifier((CFStringRef)bundleID, NO);
 NSLog(@"launching [%@] error: [%d]", bundleName, error);
 if (error) {
   CFStringRef errorStr = SBSApplicationLaunchingErrorString(error);
   DLog(@"launching %@ error to string [%@]", bundleName, (NSString *)errorStr);
   CFRelease(errorStr);
 }

I use the above code to launch my second application from my first application, mostly it can launch successfully. However, SOMETIMES it fails to launch. I see this error on syslog

launching [myFirstApp] error: [7]

launching myFirstApp error to string [application not found]

How can I always launch the application?

Note that my first application is running as a daemon

BB.
  • 707
  • 2
  • 11
  • 22
  • You've given your daemon the `com.apple.springboard.launchapplications` entitlement? – Nate Jun 02 '14 at 06:09
  • I have already added com.apple.springboard.launchapplications entitlement to the daemon – BB. Jun 03 '14 at 10:26

0 Answers0