RewardedAdView
should be a struct
, not a class
. If you need an NSObject
subclass to use as a delegate or for the target/action pattern, make it the Coordinator
type of RewardedAdView
.
Watch Integrating SwiftUI from WWDC 2019 for an explanation of how to implement a Coordinator
class.