James Finley
James Finley

Reputation: 485

Swift 2.0 and Google Analytics: Use of unresolved identifier "GAI"

I tried with CocoaPods and wound up with this issue after trying for hours and figured it was CocoaPods. Uninstalled CocoaPods and installed the SDK manually and wound up with the same issue.

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
{
    GAI.sharedInstance().trackerWithTrackingId("UA-XXXX-Y");
    return true
}

This results in the error Use of unresolved identifier "GAI". I have a bridging header that imports the appropriate header files and all the required libraries included in my Build Phases. Please help!

Upvotes: 2

Views: 1796

Answers (1)

James Finley
James Finley

Reputation: 485

Apparently I just needed to clear my derived data and restart Xcode. Xcode sucks sometimes. Ha. Thank you Björn Ro.

Upvotes: 2

Related Questions