测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | 商业 |
发布最后发布 | 2024年3月 |
由Gonzalo Alsina,Geoff Heeren,Arnau Marti,Jose Padilla,Daniel Barros,Javier Serrano,Helium Service,Ivan Bella 维护。
版本 7.0.2
Chartboost iOS SDK 是 Chartboost 网络的基石。它
提供了展示横幅广告、更多应用页面和
追踪应用内购买收入的功能。
startWithAppId:appSignature:delegate:
必须在硬件和软件启动期间始终被调用,无论您的应用正在执行哪些其他操作。提示:如果需要,请选中“如果需要则复制项目”选项。这会在您的项目中创建框架本地副本,从而保持项目的整洁。
链接 StoreKit
,Foundation
,CoreGraphic
,WebKit
和 UIKit
框架。
将导入头文件 #import <Chartboost/Chartboost.h>
添加到您的 AppDelegate.m 文件中。
在 didFinishLaunchingWithOptions
方法中初始化 Chartboost。
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Initialize the Chartboost library
[Chartboost startWithAppId:@"YOUR_CHARTBOOST_APP_ID"
appSignature:@"YOUR_CHARTBOOST_APP_SIGNATURE"
delegate:self];
return YES;
}
**Please note:**
- `startWithAppId:appSignature:delegate:` must always be called during hard and soft bootups, no matter what other actions your app is taking.
- You might receive a warning when passing an object as a delegate into the `startWithAppID:appSignature:delegate:` method. You can usually ignore this warning, but you can also resolve it by ensuring that the object you're passing conforms to the ChartboostDelegate protocol.
添加您的应用 ID 和应用签名。
YOUR_CHARTBOOST_APP_ID
和 YOUR_CHARTBOOST_APP_SIGNATURE
替换为您的应用 ID 和应用签名。要展示静态或视频横幅广告
[Chartboost showInterstitial:CBLocationHomeScreen];
在主屏幕位置展示横幅广告。有关可用的位置选项,请参阅 Chartboost.h。要展示奖励视频广告
[Chartboost showRewardedVideo:CBLocationMainMenu];
在主菜单位置展示奖励视频的前置消息和视频广告。有关可用的位置选项,请参阅 Chartboost.h。测试您的集成。
检查Chartboost仪表板中的SDK图标。
有关更多常见用例,请访问我们的在线文档。
查看我们的头文件Chartboost.h
获取完整的API规范。
如果您遇到任何问题,请毫不犹豫地联系我们的快乐支持团队:[email protected]。