I am trying to stop an action from happening when the app is first launched, and have used the code;
if defaults.bool(forKey: "First Launch") == true {
defaults.set(true, forKey: "First Launch")
print ("SECOND+")
AppOpenAdManager.shared.showAdIfAvailable()
}else{
print ("FIRST")
defaults.set(true, forKey: "First Launch")
}
The issue I am having, is that I am using google UMP (which triggers popups for UK/EU users – the first, to consent, the second, which appears straight after, is a standard apple Apptracking permission prompt (UI Alert style).
The moment I press ‘Allow’ on the apptracking prompt – the app thinks it is now the second launch when it clearly isn’t and triggers the background ad – I want to stop this happening but can’t figure out how?
Those prompts only appear the first time a user installs the app, and they are down to EU regulations / Apple rules.
So it is a non issue once that has happened, however it is something I would prefer to tidy up to prevent ads just appearing for the user out of nowhere.