I am trying to create a singleton class, subclass of GADRewardBasedVideoAdDelegate
. Something like this:
import Foundation
import GoogleMobileAds
class MyAdsManager : GADRewardBasedVideoAdDelegate {
private let id : String = "MY_ADMOB_ID"
private var selector : (()->Void)?
static let instance: MyAdsManager = {
return MyAdsManager()
}()
class func getInstance() -> MyAdsManager {
return instance
}
private init() {
loadVideo()
}
//more methods
}
The error message is:
Type 'MyAdsManager' does not conform to protocol 'NSObjectProtocol'
I am not sure if I am doing this correctly, but implementing NSObjectProtocol
is not something I am looking for...
Thank you in advance people.