简体   繁体   中英

The code needed for implementing a Smart Banner for my iOS App

I am looking to implement Smart Banners for my website/app. I am going to implement the meta tags needed for the website implementation, as per Apple's website https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html and so many other tutorials. What I just don't understand is what code am I actually supposed to put in the :

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

I see that the url is my App ID, etc, but what code do I implement? I'm not bothered about the user going to a specific place in the app, I just want the app to be opened from the smart browser.

Nothing doesn't work just yet because I'm not actually sure what code needs to be implemented.

For example, do I implement the code in this question: iPhone Smart App Banners - openUrl not called ?

This link states that I just need to adjust the meta tags : http://david-smith.org/blog/2012/09/20/implementing-smart-app-banners/

This link also doesn't provide a great deal of detail with the actual code part : http://smartappbanners.com

Any assistance on this would be really great - sorry it's such a basic question.

In the website, you want to make app arguments to pass on to your app, which you can parse with the url. The arguments should be what you are currently on in the web browser and the app should parse the arguments and take you straight to relevant page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM