0
votes

How do we identify if app is launched via app banners?

When app banner is tapped it calls delegate method -

func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool

But there can be other instances when this method could be invoked. How can we be 100% sure if app banner is tapped and nothing else?

1

1 Answers

1
votes

You can provide context to the app banner via its app-argument parameter. See the official documentation.

For example:

<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myscheme://settings">

The URL you would receive in - application:openURL:sourceApplication:annotation: is myscheme://settings.