views:

25

answers:

1

Hello everybody,

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??

A: 

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://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

Squeegy