I just started a new project on Xcode 12 with Apple M1 Chip. I did run into issues when I was installing the pods but I was able to fix them using sudo arch -x86_64 gem install ffi
then arch -x86_64 pod install
. Now, the issue that I am facing is when I added the in-app purchases and the admob pod for ads. I got an error that said Cannot find type 'SKProduct' in scope
and Cannot find type 'GADInterstitial' in scope
. I changed the Validate Workspace to YES
in the Build Settings and that did not fix it.
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
2
Answers
I was getting the same errors:
Cannot find type ‘SKProduct’ in scope and Cannot find type ‘GADInterstitial’ in scope. I use Firebase in the project. In pod file when I changed pod ‘Firebase/Analytics’ to pod ‘FirebaseAnalytics’ then open xcworkspace from terminal and then clean the project the problem has been solved.
GADInterstitial was rename in GADInterstitialAd Google Ads v 8.0.0
See all renamed classes
https://developers.google.com/admob/ios/migration#class_renames