Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find type 'SKAdImpression' in scope

I'm trying to implement MoPub into my Swift app, but in some of the files that are provided by the MoPub pod there are errors saying Cannot find type 'SKAdImpression' in scope. I also cannot import MoPub in my own documents. I tried running pod update restarting xcode, and making sure I am using the .xcworkspace file

Edit: I just re-read the apple documentation, and noticed that it says SKAdImpression is an iOS 14.5+ feature. The version of Xcode I have is for iOS 14.4, so it makes sense as to why it cannot be found. My only concern is, does this mean that my app will only work on iOS 14.5+?

Edit 2: My mac does not support the latest MacOS which is required for the latest Xcode for 14.5. Is there anything I can do to get MoPub working anyway?

like image 516
CHRIS C Avatar asked Jun 22 '26 00:06

CHRIS C


1 Answers

The version of Xcode I have is for iOS 14.4
My mac does not support the latest MacOS

Bad news is that is there is no other way around this error, as far as I can see.
What did not help:

  • Removing the version, pod 'mopub-ios-sdk' and running pod install of pod update again.
  • Cleaning Build Folder.
  • Cleaning the /DerivedData folder.

What did help:

  • Updating Xcode to the 12.5 version.
like image 131
Lveecode Avatar answered Jun 24 '26 17:06

Lveecode



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!