因此,我正在嘗試將Google Analytics安裝在我的應用程序內部,並且一直遵循Google位於此處的說明https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift。Mach-O鏈接器在嘗試在xcode中設置Google Analytics時發生錯誤
我Podfile看起來IKE在此:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Google/Analytics', '~> 1.0.0'
pod 'Google-Mobile-Ads-SDK'
現在一切都跑吊艙安裝後很好,但是當我說的這段程式碼,我AppDelegate.swift文件,應用程序無法編譯。
// Configure tracker from GoogleService-Info.plist.
var configureError:NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(configureError)")
// Optional: configure GAI options.
var gai = GAI.sharedInstance()
gai.trackUncaughtExceptions = true // report uncaught exceptions
gai.logger.logLevel = GAILogLevel.Verbose // remove before app release
這導致以下編譯錯誤:
的架構arm64未定義的符號: 「_OBJC_CLASS _ $ _ GAI」,從引用:在AppDelegate.o 「_OBJC_CLASS _ $ _ GGLContext」 __TMaCSo3GAI,從引用: __TMaCSo10GGLContext在AppDelegate.o LD:符號(多個)未找到架構arm64 鐺:錯誤:連接器命令,退出代碼1失敗(使用-v看調用)
任何想法如何解決這個問題?
你有沒有修復過你的問題? – bardu