Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Corona Native IOS Open URL
Started by Rob... Oct 14 2019 01:22 AM

No replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Rob...

[GLOBAL: userInfoPane.html]
Rob...
  • Contributor

  • 330 posts
  • Corona SDK

Hello.  I have gone back to some really old code recently that I used to use on Corona Cards and updated to native. I am now trying to figure out how to grab a URL that opens the app up from background as well as cold start. I have seen that some examples I see online are outdated although still work. I can't get the new method working.

This old method works:

 

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

     NSLog(@"openURL :");

    return YES;

}

 

But its deprecated. Im told to use this now:

 

(BOOL)application:(UIApplication *)app

            openURL:(NSURL *)url

            options:(NSDictionary<UIApplicationOpenURLOptionsKeyid> *)options;

{

     NSLog(@"openURL NEW:");

 

    return YES;

}

 
And that doesn't work 
But if I used Corona LUA method of launchArgs ... and checking for URL, I get that correct URL.
 
Im wondering if its something to do with Corona delegate or something else that's not passing to this new method.
Or is Corona using up the URL so its disposed off before I can access it after the delegate? 
Or is Corona using the the deprecated way still ?
For now Im going to use Corona Launch args to now send to native side, hopping Corona are using the non deprecated way:
application:(UIApplication *)app

 

 




[topic_controls]
[/topic_controls]