admob icon indicating copy to clipboard operation
admob copied to clipboard

'keyWindow' was deprecated in iOS 13.0

Open thommydz opened this issue 2 years ago • 0 comments

When building my Capacitor app in Xcode, I get multiple warnings from the AdMob plugin:

(..)/node_modules/@capacitor-community/admob/ios/Plugin/Interstitial/AdInterstitialExecutor.swift:35:58: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes

It's just a warning and I don't think it does any harm, but would be nice if this was fixed.

I think it can be fixed quite easily by changing keyWindow to: UIApplication.shared.windows.filter {$0.isKeyWindow}.first

thommydz avatar Aug 22 '22 13:08 thommydz