As I have read many Firebase AdMob related issue questions and its solution I have done the same thing with my app & CocoaPod
update but still facing an issue with the library and getting the below error:
[GADMobileAds configureWithApplicationID:@"ca-app-pub-3940256099942544~1458002511"];
Error: No unknown class for the selected method configureWithApplicationID
Question reference: Can't Update Google AdMob in iOS Project
Still, it's getting below SDK version from POD
Google-Mobile-Ads-SDK (7.8.1)
Though I put manually forced update on the latest version like below:
pod 'Google-Mobile-Ads-SDK', '~> 7.16'
also
pod 'Google-Mobile-Ads-SDK', '~> 7.9.1'
Reference: Based on CocoaPod site
target 'MyApp' do pod 'Google-Mobile-Ads-SDK', '~> 7.16' end
It will give me an error like:
[!] Unable to satisfy the following requirements: - `Google-Mobile-Ads-SDK (= 7.16)` required by `Podfile` None of your spec sources contain a spec satisfying the dependency: `Google-Mobile-Ads-SDK (= 7.16)`. You have either: * out-of-date source repos which you can update with `pod repo update`. * mistyped the name or version. * not added the source repo that hosts the Podspec to your Podfile. Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I have also done pod repo update
but still no result for the latest library.
Edit:
While I download manually still it's giving me the old library without the above method implemented how disgusting SDK update Google needs to update this library regularly.
Please help me on the same as I have been stuck here since last night.
Thanks in advance.
Since last night I was struggling with this issue and at last, I found a solution. Though answering my own question to help others who have the same problem.
As CocoaPod
has also cache into our system that's why it's creating problems and not getting the latest library from the CocoaPod
server.
So I made the below step to achieve the latest Google mobile ads SDK 7.16.
Step1: Clear all CocoaPod cache by the below commands.
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
Step2: Setup pod again to get all repo from master POD.
pod setup
Step3: Get Updated Library from POD.
pod update
and finally got below latest library from POD:
Analyzing dependencies
Pre-downloading: `youtube-ios-player-helper` from `https://github.com/youtube/youtube-ios-player-helper`, commit `head`
Removing GoogleUtilities
Downloading dependencies
Using AFNetworking (3.1.0)
Installing Firebase 3.11.1 (was 3.2.0)
Installing FirebaseAnalytics 3.6.0 (was 3.2.0)
Installing FirebaseCore (3.4.7)
Installing FirebaseInstanceID 1.0.8 (was 1.0.6)
Installing Google-Mobile-Ads-SDK 7.16.0 (was 7.8.1)
Installing GoogleInterchangeUtilities 1.2.2 (was 1.2.1)
Installing GoogleSymbolUtilities 1.1.2 (was 1.1.1)
Installing GoogleToolboxForMac (2.1.1)
Installing MBProgressHUD 1.0.0 (was 0.9.2)
Installing SDWebImage 3.8.2 (was 3.7.6)
Installing youtube-ios-player-helper 0.1.6 (was 0.1.6)
Generating Pods project
Integrating client project
so now I got the latest version of SDK in my app:
**Installing Google-Mobile-Ads-SDK 7.16.0 (was 7.8.1)**
Hope this will helps to resolve the CocoaPod
issue to not get the latest library or SDK from Server.
Thanks!