Cannot assign value of type 'ViewController' to type 'GADInterstitialDelegate?'

I am getting the Cannot assign value of type 'ViewController' to type 'GADInterstitialDelegate?' error in xcode 9.

It's in the admob part

I underlined and bolded the line which the error is on


/

private func createAndLoadInterstitial() -> GADInterstitial? {

interstitial = GADInterstitial(adUnitID: "ca-app-pub-9502906647971710/5849467952")

let request = GADRequest()

/

request.testDevices = [ kGADSimulatorID ]

interstitial.load(request)

interstitial.delegate = self

return interstitial

}

func interstitialDidReceiveAd(_ ad: GADInterstitial) {

print("Interstitial loaded successfully")

ad.present(fromRootViewController: self)

}

func interstitialDidFail(toPresentScreen ad: GADInterstitial) {

print("Fail to receive interstitial")

}

}





Thanks for anyone who responds