presentFromRootViewController in SKScene (Problem)

Hello,

 

While trying to have interstitial ads pop up at my GameOverScene, (which is an SKScene *.sks* with a .swift file that corresponds to the .sks file, I realized that I cannot use the code:

 

if interstitial.isReady {

     interstitial.present(fromRootViewController: self) Error -> *Cannot convert value of type ‘GameOverScene’ to expected argument type ‘UIViewController’*

 

Is there a way I can somehow have the ad pop up, although it is not in a ViewController? If I would, that would be a lifesaver.

 

Thanks,

 

Julian

Powered by WPeMatico

About

You may also like...

Comments are closed.