Apache
Apache

Reputation: 1806

how to call an iphone application from different application

is it any possibilities to invoke/call iphone application from different application, if so means, whats the snippet for that..

Upvotes: 4

Views: 3202

Answers (2)

Joshua J. McKinnon
Joshua J. McKinnon

Reputation: 1696

Note that the protocol handler for your application must be unique - if more than one application installed on an iPhone respond to the same handler, there is no way of knowing which app will launch.

i.e.

tweet://... - bad.

mySuperTwitterApp://... - good.

Upvotes: 0

mr-sk
mr-sk

Reputation: 13397

This is a specific example, but, if you setup a protocol handler, when a url is loaded by Safari that it can't handle (yourappProtocol://) it will fire off your application to handle it.

You need to add runtime config to your Info.plist.

And then implement the delegate:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    [viewController handleURL:url];
    return YES;
}

Read more info here: http://www.mobileorchard.com/apple-approved-iphone-inter-process-communication/

And here: http://blog.innerfence.com/2009/01/05/2-way-app-integration-on-the-iphone-how-it-works/

Upvotes: 3

Related Questions