Swift/Xcode AdColony returns error when trying to call AdColony.configure in appdelegate

279 views Asked by At

im trying to initialize AdColony in my appdelegate with this line of code:

AdColony.configureWithAppID(appID: "app id", zoneIDs: ["zoneid1", "zoneid2"], delegate: self, logging: true) 

however, I getting this error:

Cannot invoke 'configureWithAppID' with an argument list of type '(appID: String, zoneIDs: [String], delegate: AppDelegate, logging: Bool)"

2

There are 2 answers

0
Mason Carter On BEST ANSWER

make sure u add adcolonydelegate after appdelegate

0
Adrien Cadet On

According to the SDK, the delegate argument should be an AdColonyDelegate and not an AppDelegate. Your wrapping class (referenced using self) might not implement this protocol.

Moreover, the appID label needs to be removed. Indeed, in Swift, when calling a method, the first label is always omitted.