Module 'GoogleMobileAds' not found in iOS

后端 未结 20 2307
感动是毒
感动是毒 2020-12-09 07:42

I updated Google AdMob SDK to 7.1.0 using Pods.

So in my appDelegate.m, I am trying to add this line

@import GoogleMobileAds;

But I

20条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 08:14

    If anyone is still experiencing this same problem, I was just able to find a solution. I spent hours attempting everything that was recommended so far and NOTHING worked, I still don't know what I was doing wrong, but here was a little hack that worked for me: Whatever framework I kept downloading from Google (I tried the manual and Cocoa Pods methods) would not work, but when I just downloaded their little tester xCode project (BannerExample.xcodeproj I believe), I copied the framework that was bundled with that test project, pasted it in my target project file and then added the framework and linked it. After doing this I was able to import the framework just fine and adMob works great. I can't for the life of me figure out what the difference would be, but this did work. I hope this solution might help anyone else dealing with the same problem. I believe I ripped out one of the last five hairs on my head. Good luck!

提交回复
热议问题