mobile-sdk-ios
mobile-sdk-ios copied to clipboard
Cannot implement "ANCustomAdapterBanner" protocol in Swift
My ObjC project works but I have issues with Swift.
Whenever I conform to the "ANCustomAdapterBanner" protocol I receive an error saying I need to implement required methods.
ReuestAdWithSize method is fine, the main issue comes from required delegate, if I declare it like this: "public var delegate: ANCustomAdapterBannerDelegate?" Xcode is complaining that I am not conforming to "ANCustomAdapter". If i click on fix in Xcode it will add this delegate: "public var delegate: ANCustomAdapterDelegate?". Now I have two delegates with same name.
public var delegate: ANCustomAdapterDelegate?
public var delegate: ANCustomAdapterBannerDelegate?
If I remove one of them Xcode is complaining again about missing required delegate. Am I doing something wrong here? Thank you.
The two variables listed conform to two different delegates so you should probably name them differently. Can you please open a support ticket- https://support.appnexus.com/. More context with your objectives and a full code example would be helpful. Thank you.
I should have included this doc. You should only need to implement the second delegate listed- ANCustomAdapterBannerDelegate. I am not sure why Xcode is telling to conform to both protocols. Can you please share more information with the above support link?
https://user-images.githubusercontent.com/64143812/154640692-872fbe44-af2f-4bbd-86e4-001833217785.mov
Thank you Daniel for you reply. I have recorded short video to show you whats happening.
Fixed in SDK v8.0 https://github.com/appnexus/mobile-sdk-ios/releases/tag/8.0.0