Implement smart banner in iOS9

I have been searching for a way to implement promotional smart banners that take a user to my usual main launch activity from my website, the web code is easy, I just don't know how to do that on the application side.

So I researched that the method I need to implement in the app delegate is:

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool
{
    // Code here
}

But that function is deprecated in iOS9. The new one is:

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
    // code here
}

I want to send the user to the main launcher view controller, and I want to support iOS7 and up. Which func do I implement? Will implementing both call the code twice? What code do I use to just send the user to the main view?

Answers


You need to create deep links for your app. A good link that explains how.


Need Your Help

iPhone dev - viewDidLoad and viewDidUnload in programmatically created view?

iphone memory-management uiviewcontroller viewdidload

I read somewhere that in a programmatically created view in a UIViewController, not using Interface Builder, -viewDidLoad and -viewDidUnload should not be used. Is this right? Why? Where would I re...