Im using startApp to display ads but when the view disappears it doesn't show the ad. I have startAppAd = STAStartAppAd()
in viewDidLoad()
I'm not quite sure what is going wrong.
override func viewDidAppear(_ animated: Bool) {
startAppAd?.load()
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
startAppAd?.show()
}
viewDidDisappear
is called when the vc is about to dimiss or popped , so any property is in it's way to deallocate if that vc is not strongly linked , so move theshow
method also insideviewDidAppear
or in the ad load finish callback if any