と仮定:のiOS:CocoaPodsのGoogleアナリティクスの問題とAdMob
- を私は
pod 'Google/Analytics
を使用して、Googleアナリティクス用CocoaPodsを設定している、 公式インストールガイド以下: https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift - 私はのためにCocoaPodsを設定していますAdMob
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
を使用し、 公式インストールガイドの後に: https://developers.google.com/admob/ios/quick-start#streamlined_using_cocoapods - 私はここで報告されたボタンを使用して、解析とAdMobサービスの両方を指定して、
GoogleService-Info.plist
設定ファイルを生成:https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift#get-config
私は警告を取得アプリ起動時:
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.}): file /myapp/AppDelegate.swift
このコードのアサーション行でスローされるGoogle Anドキュメントalytics AppDelegate.swift
ファイルに追加するには、言った:私は、私はもうクラッシュしないpod 'Google/AdMob'
アプリで
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
を交換しようとした
// Configure tracker from GoogleService-Info.plist.
var configureError:NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(configureError)")
、私は取得警告:
You are currently using version 7.6.0 of the SDK. Please consider updating your SDK to the most recent SDK version to get the latest features and bug fixes
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks! # needed when using Swift
target 'myProject' do
pod 'Google/Analytics'
pod 'GoogleIDFASupport'
pod 'Google-Mobile-Ads-SDK', '~> 7.0'
pod 'Fabric'
pod 'Crashlytics'
pod 'SQLite.swift', '~> 0.9.2'
end
モバイル広告SDKを単独でインポートするとどうなりますか? –
@Chauduyphanvu、それはCocoaPodの問題なので、CocoaPodのバージョンと関係があります –