-1

what should I change? I am trying to make rewarded ad in swiftui

enter image description here

Asker
  • 13
  • 1

1 Answers1

1

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.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848