Search code examples
iphoneviewutility

Question on Utility Application - iPhone SDK


I have this application I made on a utility based app. How would I incorporate this app into a view based application so I can run the code from there.. Like 2 seperate projects in one. I basically want to open/show the utility app in my view based application when I press a button.. Is this possible??


Solution

  • You want to implement a URL scheme for the app you want to launch. Then from the calling app have something like this:

    NSURL *appUrl = [NSURL URLWithString:@"myapp://foo/bar"];
    UIApplication *app = [UIApplication sharedApplication];
    if ([app canOpenURL:appUrl]) {
        [app openURL:appUrl];
    } else {
        // tell user they need to have this other app installed.
    }
    

    More info about how to do this here: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html