首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Chartboost集成到Swift

将Chartboost集成到Swift
EN

Stack Overflow用户
提问于 2015-08-05 23:51:42
回答 1查看 607关注 0票数 0

我已经集成了来自https://answers.chartboost.com/hc/en-us/articles/201220095-iOS-Integration的所有图表增强

但我在chartboost.h文件中不断收到这18个错误。http://i.stack.imgur.com/s7Xek.png

我不确定我的AppDelegate.swift是否正确地集成了swift?

代码语言:javascript
复制
class AppDelegate: UIResponder, UIApplicationDelegate, ChartboostDelegate {
    var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    let kChartboostAppID = "559f1b52c909a64f054eb563";
    let kChartboostAppSignature = "41ad09b1bd90bbf3b3712d9530f45daff3fbd04f";

    Chartboost.startWithAppId(kChartboostAppID, appSignature: kChartboostAppSignature, delegate: self)
    Chartboost.setShouldRequestInterstitialsInFirstSession(false)



    return true

}

func showChartboostAds()
{
    Chartboost.showInterstitial(CBLocationHomeScreen);

}

func didFailToLoadInterstitial(location :String!, withError error: CBLoadError)
{

}

func didDismissInterstitial(location :String! )
{
    if(location == CBLocationHomeScreen)
    {
        Chartboost.cacheInterstitial(CBLocationMainMenu)
    }
    else if(location == CBLocationMainMenu)
    {
        Chartboost.cacheInterstitial(CBLocationGameOver)
    }
    else if(location == CBLocationGameOver)
    {
        Chartboost.cacheInterstitial(CBLocationLevelComplete)
    }
    else if(location == CBLocationLevelComplete)
    {
        Chartboost.cacheInterstitial(CBLocationHomeScreen)
    }
}

请帮帮我,我已经被困在这里好一阵子了,你能帮帮我吗?

EN

回答 1

Stack Overflow用户

发布于 2015-09-12 17:42:47

我也有同样的问题。我将整个Chartboost文件夹放入我的项目中,而不仅仅是框架。进入文件夹并删除ChartboostExample。其中有一个Xcode项目示例,它似乎会导致一些奇怪的事情发生。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31837240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档