我剛剛找到了Chartboost,我正試圖整合SDK,但由於某些原因,本教程中的步驟3:https://answers.chartboost.com/hc/en-us/articles/205853276-Download-Integrate-the-Chartboost-SDK-for-iOS-Swift我收到一個錯誤消息:使用未解析的標識符「Chartboost」。我猜想我的頭文件有問題,因爲那是我聲明Chartboost的原因(第2步)。但也許它只是在錯誤的地方,因爲他們沒有說我必須把代碼放在哪裏,所以我只是把它放在AppDelegate.swift中,因爲那是我知道的具有didFinishLaunchingWithOptions函數的唯一文件。那麼我該如何解決這個問題?如何在Swift SpriteKit中集成Chartboost SDK?
頭文件
#ifndef Header_h
#define Header_h
#import <UIKit/UIKit.h>
#import <Chartboost/Chartboost.h>
#import <CommonCrypto/CommonDigest.h>
#import <AdSupport/AdSupport.h>
#endif /* Header_h */
的AppDelegate:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Initialize the Chartboost library
Chartboost.startWithAppId("AppId", appSignature: "AppSignature", delegate: nil)
}
使用相關代碼更新您的問題,並顯示出現錯誤的位置。 – rmaddy
好吧我現在改了它 –
哪個頭文件是那個?它是否被導入到AppDelegate.swift中? – rmaddy