简体   繁体   English

我可以根据iTune appstore中我的应用程序的推荐人在iPhone应用程序中动态呈现内容

[英]Can I render content dynamically within an iPhone app according to the referrer to my app in iTune appstore

I have an app that I need to render different content depending on which site refers the user to download my app. 我有一个应用程序,我需要呈现不同的内容,具体取决于哪个站点引用用户下载我的应用程序。 For example, website A has a link to let its users to download my app, I would like to display some products from website A when user first runs my app after installation. 例如,网站A有一个链接让其用户下载我的应用程序,我想在安装后用户首次运行我的应用程序时显示网站A的一些产品。 Is this doable? 这可行吗? Thanks. 谢谢。

This is definitely doable, the easiest way I can think of would be to have the user enter some kind of promo code corresponding to the website they downloaded your app from. 这绝对可行,我能想到的最简单的方法是让用户输入与他们下载你的应用程序的网站相对应的某种促销代码。 From there you can compare what they entered to an array of valid promo code strings and if it matches set a bool for that particular promo code to YES, then set up your UI to something like 从那里你可以将他们输入的内容与一系列有效的促销代码字符串进行比较,如果匹配,则将特定促销代码的bool设置为YES,然后将UI设置为类似

if(website1bool == YES){Display customized UI};

Then add this bool to NSUserDefaults to remember the changes. 然后将此bool添加到NSUserDefaults以记住更改。 It might end up being a lot of "ifs" but it's definitely doable! 它可能最终成为很多“ifs”,但它绝对可行!

EDIT : in defaults set up would be more or less... 编辑 :默认设置将或多或少...

if([myDefaults boolForKey@"website1Bool"] == YES){Configure};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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