2017-01-25 26 views
0

採取最新的谷歌廣告暴民SDK正如我已經讀了很多火力地堡的AdMob相關的問題的問題,它的解決方案,我已經做了同樣的事情,與我的應用程序& CocoaPod更新,但仍面臨問題與庫下方錯誤:火力地堡的AdMob無法從莢或服務器

[GADMobileAds configureWithApplicationID:@"ca-app-pub-3940256099942544~1458002511"]; 

Error : No unknown class for selected method configureWithApplicationID

問題參考:Can't Update Google AdMob in iOS Project

儘管如此其克ETTING以下SDK版本從POD

Google-Mobile-Ads-SDK (7.8.1)

雖然我把手動強制更新的最新版本,象下面這樣:

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

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

Reference : Based on CocoaPod site

target 'MyApp' do pod 'Google-Mobile-Ads-SDK', '~> 7.16' end

它會給我的錯誤,如:

[!] 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. 

我也做莢回購更新

,但還是沒有結果的最新庫。

編輯:

雖然我下載手動還是它給我的老圖書館沒有上面的方法來實現SDK更新谷歌如何噁心需要更新定期這個庫。

請幫助我一樣,因爲我昨晚從此卡住了。

在此先感謝。

回答

1

由於昨晚我在這個問題上很掙扎,最後我找到了解決方案,所以我張貼我自己的答案,所以可能有些從這個答案得到幫助。

由於CocoaPod也緩存到我們的系統這就是爲什麼它的創建問題,而不是從CocoaPod服務器獲取最新的庫。

所以我下面做了一個步驟來實現最新的谷歌移動廣告SDK 7.16。

第1步:通過下面的命令清除所有CocoaPod緩存。

rm -rf "${HOME}/Library/Caches/CocoaPods" 
rm -rf "`pwd`/Pods/" 

第二步:再次安裝莢擺脫主POD全部回購。

pod setup 

第三步:從POD更新庫。

pod update 

終於拿到了低於從POD最新的磁帶庫:

**Installing Google-Mobile-Ads-SDK 7.16.0 (was 7.8.1)** 

希望這將:

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 

所以現在我在我的應用得到了最新版本的SDK有助於解決CocoaPod問題,無法從服務器獲取最新的庫或SDK。

謝謝!

0

我遇到了同樣的問題。在我的情況下,這是因爲我使用的是pod install而不是pod update

一旦我用pod update代替,Firebase更新爲新版本,其中包括最新版本的Google-Mobile-Ads-SDK。

很好的解釋差異在CocoaPods not updating Firebase SDK to Version 4.0.0