Issue with CocoaPods

1,748 views
Skip to first unread message

gobr...@baroncelli.eu

unread,
Mar 15, 2016, 3:04:13 PM3/15/16
to Google Mobile Ads SDK Developers
When using CocoaPods

pod 'Google-Mobile-Ads-SDK', '~> 7.0'

I get an error:
"You have enabled the AdMob service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/AdMob" or you may need to run pod update in your project directory."

Here is the full description:
http://stackoverflow.com/questions/36000833/ios-issue-with-admob-when-using-cocoapods

Please help,

Daniele

Veer Arjun Busani

unread,
Mar 15, 2016, 4:01:19 PM3/15/16
to Google Mobile Ads SDK Developers
Hi there,

Would you be able to change it to - pod 'Google-Mobile-Ads-SDK''~> 7.7'.  Do this and run pod update and do let us know if it fixes your issue. You could also test it out using our sample app.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team

gobr...@baroncelli.eu

unread,
Mar 16, 2016, 1:19:30 PM3/16/16
to Google Mobile Ads SDK Developers
Hi Veer,

This is very strange. I tried with the sample app, applying the same Podfile I do, and it works.

I always get this message:

"You have enabled the AdMob service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/AdMob" or you may need to run `pod update` in your project directory.
assertion failed: Error configuring Google services: Optional(Error Domain=com.google.greenhouse Code=-106 "Missing expected subspecs." UserInfo={NSLocalizedFailureReason=Some subspecs are not pod installed. See log for details., NSLocalizedDescription=Missing expected subspecs.})"

Somehow it must be something related to your library, which wrongly expects `pod "Google/AdMob"`. What should it expect Google/AdMob?

I can't really find a solution myself, please help.

Daniele

Veer Arjun Busani

unread,
Mar 16, 2016, 2:26:05 PM3/16/16
to Google Mobile Ads SDK Developers
Hi there,

Thank you for the information and I was able to confirm that the specs have yet to be updated for pod Google/AdMob. Until the team updates it to the latest v7.7, I would suggest you to use  pod 'Google-Mobile-Ads-SDK', '~> 7.7' instead.

gobr...@baroncelli.eu

unread,
Mar 16, 2016, 2:36:29 PM3/16/16
to Google Mobile Ads SDK Developers
Hi Veer,

I am actually using this pod line now:

pod 'Google-Mobile-Ads-SDK', '~> 7.7'

but I still get the error

I am not using the pod `Google/AdMob`, so it doesn't make sense that such an error is thrown

I even tried deleting the Pods cache and directory:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update



but I still get the error

it seems there is a bug in the Google-Mobile-Ads-SDK, mentioning Google/AdMob

there must be an explanation!

Daniele

Veer Arjun Busani

unread,
Mar 16, 2016, 3:11:05 PM3/16/16
to Google Mobile Ads SDK Developers
Hi there,

Now this is weird. One thing that confirms to me is that this could very well be a CocoaPod issue that might be breaking something in your project. I'm inclined to think that it could be due to the sub specs that were being added when you used Google/AdMob. If you are unable to move forward with your project, I would suggest you to either manually add the Mobile Ads SDK or create a new project and then try to add the pod again. 

gobr...@baroncelli.eu

unread,
Mar 16, 2016, 11:51:06 PM3/16/16
to Google Mobile Ads SDK Developers
Hi Veer,

I had generated the `GoogleService-Info.plist` file
by enabling Google Analytics and Google AdMob
using this Google page:
https://developers.google.com/analytics/devguides/collection/ios/v3/start?ver=swift


could it be that the "Google/AdMob" requirement comes from that GoogleService-Info.plist file?

what is the current reason to have both the Google-Mobile-Ads-SDK and Google/AdMob pods?


Daniele

gobr...@baroncelli.eu

unread,
Mar 16, 2016, 11:57:37 PM3/16/16
to Google Mobile Ads SDK Developers
The error message:

"You have enabled the AdMob service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/AdMob" or you may need to run `pod update` in your project directory."

might depend on the fact that I selected AdMob in the Developer Console which generated the `GoogleService-Info.plist` file, and it's somehow it's expecting me to add the line `pod "Google/AdMob"`

could it be that?

Daniele

Veer Arjun Busani

unread,
Mar 17, 2016, 10:36:19 AM3/17/16
to Google Mobile Ads SDK Developers
Hi there,

If you have added AdMob as a dependency while creating your configuration plist file through Google Analytics, then you are right. For your case, I would suggest you to remove this dependency and directly add our  pod 'Google-Mobile-Ads-SDK', '~> 7.7'. You can still set up Google Analytics using our guidelines

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 11:27:49 AM3/17/16
to Google Mobile Ads SDK Developers
Hi Veer,

can you please give an explanation of why both 'Google-Mobile-Ads-SDK' and 'Google/AdMob' exist?
what is the difference between the two?
are both going to co-exist? or one is the legacy and the other is the one which will be supported in the future?

unfortunately, this is not clear

Daniele

Veer Arjun Busani

unread,
Mar 17, 2016, 12:27:27 PM3/17/16
to Google Mobile Ads SDK Developers
Hi there,

The only difference is the host. Currently Google-Mobile-Ads-SDK is being hosted by our server and Google/AdMob is specified on the CocoaPods git. For having the latest version, I would suggest you to always use the one hosted by us.

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 1:43:43 PM3/17/16
to Google Mobile Ads SDK Developers
This is SOOOOO badly organized!!!

The official Analytics for iOS documentation tells you to create a configuration file:
https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift

And it seems that when you use such `GoogleService-Info.plist` file
then your CocoaPod expects you to add pods as "Google/Analytics" and "Google/AdMob"

you are now telling me to neglect such configuration file, by using different pods
the whole process is clearly broken!
I can't believe your project manager allows this to happen!

So, are you suggesting me not to use the generated `GoogleService-Info.plist` file?

I can't believe this is Google


Daniele

Veer Arjun Busani

unread,
Mar 17, 2016, 2:06:18 PM3/17/16
to Google Mobile Ads SDK Developers
Hi there,

I have just created a new configuration file and have included both AdMob and Analytics. I have used pod 'Google/Analytics' and pod 'Google-Mobile-Ads-SDK''~> 7.7'in my pod file. I ran my project and did not have any issues. There was no log error or any error of any kind. This confirms to me that there is no issue here. The pod Google/AdMob is also being updated and would let you know once it's done. Till then I'm only suggesting you to use pod 'Google-Mobile-Ads-SDK''~> 7.7'. There would be absolutely no difference at all when you use this pod in your project in any way possible. 

Thanks,
Veer Busani
Mobile Ads SDK Team

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 2:37:09 PM3/17/16
to Google Mobile Ads SDK Developers
Unfortunately to me it still reports this warning:

"You have enabled the AdMob service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/AdMob" or you may need to run `pod update` in your project directory."

and it crashes with this message:
"assertion failed: Error configuring Google services: Optional(Error Domain=com.google.greenhouse Code=-106 "Missing expected subspecs." UserInfo={NSLocalizedFailureReason=Some subspecs are not pod installed. See log for details., NSLocalizedDescription=Missing expected subspecs.}): file /myapp/AppDelegate.swift"

so, there is something wrong there for sure


Daniele

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 3:01:23 PM3/17/16
to Google Mobile Ads SDK Developers
To be exact,
the crash is coming from the assert line of this code, which I added in `GoogleService-Info.plist`

        // Configure tracker from GoogleService-Info.plist.
        var configureError:NSError?
        GGLContext.sharedInstance().configureWithError(&configureError)
        assert(configureError == nil, "Error configuring Google services: \(configureError)")

as requested by the GoogleAnalytics installation guide:
https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift#initialize-analytics-for-your-app


Can you please now verify it as a bug?


Daniele

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 3:03:12 PM3/17/16
to Google Mobile Ads SDK Developers

To be exact,
the crash is coming from the assert line of this code, which I added in `GoogleService-Info.plist`


Sorry, I mean to say:
the crash is coming from the assert line of this code, which I added in `AppDelegate.swift`



Daniele

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 3:47:58 PM3/17/16
to Google Mobile Ads SDK Developers
I updated the Stackoverflow question, summaring the situation, in the light of the latest findings:

http://stackoverflow.com/questions/36000833/ios-issue-with-admob-when-using-cocoapods

Veer Arjun Busani

unread,
Mar 17, 2016, 4:07:58 PM3/17/16
to Google Mobile Ads SDK Developers
Hi Daniele,

If you are using other services besides AdMob, such as Sign-On and Analytics, then I would suggest you to continue using Google/AdMob. But if you continue to do so, do note that Google/AdMob has a slightly different, if not slower, update cycle, as this one comes with a set of other services. The team is aware of this lag and I would let you know as soon as the specs are updated.

But you can always turn off AdMob from the configuration and use it directly with our pod file. You can also enable Analytics directly from the AdMob portal page. Do note that you must set up your Ad Unit IDs directly from apps.AdMob.com if you want to do this.

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 4:18:03 PM3/17/16
to Google Mobile Ads SDK Developers
The implementation by the `GoogleService-Info.plist` configuration seems much neater. So, I would prefer to use that one.

I just don't understand why it takes more than 1 month to for that implementation to have the latest pod file.

And I understand even less why you promote 2 different CocoaPods files.


Daniele

gobr...@baroncelli.eu

unread,
Mar 17, 2016, 4:23:18 PM3/17/16
to Google Mobile Ads SDK Developers

But you can always turn off AdMob from the configuration and use it directly with our pod file. You can also enable Analytics directly from the AdMob portal page. Do note that you must set up your Ad Unit IDs directly from apps.AdMob.com if you want to do this.

I have set up my Ads already from apps.AdMob.com even using the configuration file approach. Am I doing something wrong then?

How are you supposed to set up your ads otherwise?

Daniele

Veer Arjun Busani

unread,
Mar 17, 2016, 4:34:37 PM3/17/16
to Google Mobile Ads SDK Developers
Hi Daniele,

One pod file is for standalone usage and the other(Google/AdMob) comes with a set of other services. Another way would be to completely add all of the frameworks manually if you have to use Google/AdMob.

If your Ad Unit IDs are already set up, then you are good to go. Just add our pod file and except for the configuration file, there would be no difference.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages