Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS handleOpenURL isn't called when becoming active??? iOS 5.1 (this is not a 3.2 issue)

I use a URL scheme to open my app and parse the query string from the URL in -didFinishLaunchingWithOptions:. This works great, but it doesn't parse the new string when the app becomes active. I have implemented the -handleOpenURL: and openURL methods as follows, but neither seems to be called when the app becomes active...

-(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
    if (!url) 
        return NO;

    queryStrings = [self parseQueryString:[url query]];
    return YES;
}

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    if (!url) 
        return NO;
    queryStrings = [self parseQueryString:[url query]];
    return YES;
}

Please help! Thanks!

like image 609
HackyStack Avatar asked Jan 17 '23 00:01

HackyStack


1 Answers

Use:

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

The method you're using is deprecated.

like image 92
fbernardo Avatar answered Mar 08 '23 23:03

fbernardo