Swap the application in Objective-C?
I'm developing iPad application I need to integrate third party project(Source code) wit开发者_StackOverflowh my code like i have a button in my code, when i click on the button it landed to third party application page then navigate around and vice verrsa. what is the best way to swap the app?
Regards,
Sri
Use the url schema. See add custom URL Schema using http://
Every Application can have customer url schemas. Like ...
yourapp://someting?withparams=1.
To get they running you have to change your Info.plist to inform the iOS that your app is handling that url schema. See the SO post above.
When another App calls that URL your app gets opened and you get a hook on your app delegate.
check http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
and: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIApplicationDelegate
Also look here: http://wiki.akosma.com/IPhone_URL_Schemes
精彩评论