Module 'GoogleMobileAds' not found in iOS

后端 未结 20 2228
感动是毒
感动是毒 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:18

    Xcode Version 7.2.1 (7C1002) Objective C

    I had this problem and had to keep on adding the GoogleMobileAds each time to the project to get rid of this. Not sure if this is a bug. First select the GoogleMobileAds.framework then just untick and tick the Target Membership then try build the error goes away. This worked for me. I hope it helps.

    0 讨论(0)
  • 2020-12-09 08:18

    This sometimes happen when trying not not to use GoogleMobileAds, if this is the case (as me when viewed this): 1- Click the project name. 2- Build settings. 3- Linked Frameworks. 4- Select GoogleMobileAds then the (-) button at the button.

    This solved my problem when removing ads from an app template.

    0 讨论(0)
  • 2020-12-09 08:20

    I just add "use_frameworks!" in the podfile, update pod and it works. This problem appeared when I updated my OS to El Captain (10.11.15) and XCode to 8 version. My podfile now:

        target 'My Target' do
           use_frameworks!
           pod 'MagicalRecord'
           pod 'AFNetworking'
           pod 'Firebase'
           pod 'Firebase/Core'
           pod 'Firebase/AdMob'
        end
    
    0 讨论(0)
  • 2020-12-09 08:22

    try to copy your GoogleMobileAds.framework into your root project folder and after that add it to libraries. It works perfectly for me.

    0 讨论(0)
  • 2020-12-09 08:23

    I got the same problem. here is what I did. It worked for me (Hope it helps someone).

    1. copy GoogleMobileAds.framework to somewhere and remove it from pod if you have it.
    2. Add this framework to your project manually( select "copy items if needed"). Check build phases to make sure you have it in "link binary ..." section.
    3. Clear and rebuild it again => success.
    0 讨论(0)
  • 2020-12-09 08:24

    For me, the issue was that I hadn't updated my app's "Deployment Target". It was set to < 7.0 which is why it probably was complaining. Once I updated the target to > 7.0, the errors went away. (for future people updating their apps just a few times a year like me)

    0 讨论(0)
提交回复
热议问题