At first I imported Google Analytics iOS SDK directly and everything worked. Then I started using cocoa pods to manage all of my external libraries and getting this error.
As it turned out in some cases it might be necessary to manually import library into the project. In my case I had to drop libGoogleAnalyticsServices.a into Build Phases. Just locate .a file in finder and drop it into the project.
For more details see https://github.com/CocoaPods/CocoaPods/issues/225 and https://github.com/CocoaPods/CocoaPods/issues/844.
Upgrade your GoogleAnalytics sdk using pod.
Write the following lines
platform :ios, '10.0'
target “GoogleAnalyticsTestApp” do
pod 'GoogleAnalytics'
pod 'GoogleIDFASupport'
end
This will resolve the error. From the following links you can add Google's Api:
1.http://cocoapods.org/pods/GoogleAnalytics
2.http://developers.google.com/ios/guides/cocoapods