gpt4 book ai didi

ios - 将 Chartboost 集成到 Swift

转载 作者:行者123 更新时间:2023-11-30 14:10:26 27 4
gpt4 key购买 nike

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

但我的 Chartboost.h 文件中不断出现这 18 个错误。 http://i.stack.imgur.com/s7Xek.png

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

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)
}
}

请帮忙,我已经被困在这里有一段时间了,你能帮忙吗?

最佳答案

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

关于ios - 将 Chartboost 集成到 Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31837240/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com