my iPhone program use a URL schema and work successful, to do this is only fallow this tutorial. Ok, when the program start, i use the function
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
And the launchOptions have all data that I need. This problem is solved. BUT, and when I use the URL schema and my program IS OPEN. Ok, the program open and sh开发者_运维百科ow the last windows that was in it. But I want to go to another place.
The question: How can I know the program was reactivated from a web browser with a URL Schema? What function I have to use? I didn't found any that can solve it.
YES... The correct function is this!!!! (Thanks onnoweb)
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
It's a little obscure, why not use "wasOpenedByURL". Bah.. I have to use all function in a object to know what it do.
精彩评论