测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最后一次发布 | 2015年2月 |
由 Joe Fabisevich 维护。
依赖关系 | |
PureLayout | >= 0 |
UIViewController+StoreKit | >= 0 |
这是一个辅助库,可以帮助您跨推广您的应用。
CrossPromoter 的目的是简单的。您有几款应用,您想在用户使用其中一款应用时让他们了解这些应用。您不需要申请广告网络,也不希望运行广告。
CrossPromoter 配置相当灵活,但也很容易使用,您只需要提供 AppID 和消息,就可以构建横幅和/或插屏广告。
下面有一些例子来展示它的简单性。
无论您是显示横幅还是插屏,您都需要配置一个应用来显示,所以像这样应该是可行的。
App *featuredApp = [[App alloc] init];
featuredApp.appName = @"We also make Picks";
featuredApp.appIdentifier = 899161866;
featuredApp.appIcon = [UIImage imageNamed:@"my-app-icon"];
AdvertisementViewController *bannerAdViewController = [self createAdViewControllerWithDisplayMode:DisplayModeBanner];
bannerAdViewController.adBackgroundColor = [UIColor colorWithRed:52.0f/255.0f green:73.0f/255.0f blue:94.0f/255.0f alpha:0.9f];
[self presentAdViewController:bannerAdViewController animated:YES completion:nil];
您的最终结果应该如下所示!
现在,假设您想显示一个插屏,可能是在用户多次使用应用之后,以避免让他们感到厌烦。您只需这样做即可。
AdvertisementViewController *interstitialAdViewController = [self createAdViewControllerWithDisplayMode:DisplayModeInterstitial];
interstitialAdViewController.adBackgroundColor = [UIColor colorWithRed:52.0f/255.0f green:73.0f/255.0f blue:94.0f/255.0f alpha:1.0f];
[self presentAdViewController: interstitialAdViewController animated:YES completion:nil];
// In this example we've changed the App object's name to "Picks: The Smarter To-do List";
看看吧!
横幅和插屏都允许用户在不离开当前应用的情况下安装应用。
或者选择分享。
您可以根据喜好设定广告样式,但您只需要像我们上面那样提供一个 App 对象即可。
此外,我们还提供了一个随机器,您可以提供您喜欢的应用程序商店标识符和百分比,它会为您选择一个展示在您的 AdvertisementViewController 中。
NSArray* identifiers = @[ @(picksAppStoreIdentifier), @(metroptimizerAppStoreIdentifier) ];
NSArray* percentages = @[ @(0.5), @(0.5) ];
NSInteger identifier = [AdvertisementViewController chooseAppIDFrom:identifiers percentages:percentages];
欢迎提出拉取请求和功能。