Hi,
As per the Interstitial loading Ad document an Ad expires for every one hour. Kindly follow the below code snippet to check if the Ad is expired or not:
func getTimeDifference(){
let currentTime = Date()
guard let adTime = adTime else{
return
}
let difference = currentTime.timeIntervalSince1970 - adTime.timeIntervalSince1970
print(difference)
if difference > 3600{
print("your ad is expired")
//Load ad here.
}else {
print("your ad is not expired")
}
}
As you have mentioned that you are going to the app after one hour then you can call this function applicationWillEnterForeground and viewWilAppear methods.
![]() |
Mobile Ads SDK Team |