3

My question is in someway related to the question stackoverflow.com/questions/20206565/… but the answers there do not help. I just cloned a project my co developer is working on currently and got this weird error:

"GAI.h file is not found"

Note : I have not done anything to the project.It runs perfectly in her system. Both of us use xcode 6.

(GAI.h is a header file inside GoogleAnalytics-iOS-SDK). The project uses Cocoapods and the pod file has 'GoogleAnalytics-iOS-SDK', '~> 3.0.1'also GAI.h file is present. I tried removing the SDK, adding again and cleaning but nothing worked for me. If anyone can give me some valuable inputs.

Community
  • 1
  • 1
KiranGit
  • 61
  • 1
  • 6
  • Can't tell you the exact solution. Because I also face the same issue frequently. You try to remove all google analytics files first and thenc lean your project. Add those files again and then clean. This may help you in some way. –  May 07 '15 at 04:58
  • 1
    possible duplicate of [Error importing Google Analytics iOS SDK using Cocoa Pods](http://stackoverflow.com/questions/20206565/error-importing-google-analytics-ios-sdk-using-cocoa-pods) – Vijay Masiwal May 07 '15 at 05:12
  • See the answer here : http://stackoverflow.com/questions/20206565/error-importing-google-analytics-ios-sdk-using-cocoa-pods – Vijay Masiwal May 07 '15 at 05:13
  • Thanks for the response . I have put libGoogleAnalyticsServices.a in the project and also set the other linker flag but still ails with the same error. – KiranGit May 07 '15 at 06:00
  • Try installing the cocoa pod on again... – Nilesh Patel May 07 '15 at 06:01

2 Answers2

1

Try changing your import in the header file from this... #import <GAI.h>

to this, so that it includes the module name... #import <GoogleAnalytics/GAI.h>

Maverick
  • 66
  • 4
0

I'm posting this here so that anybody facing this problem can solve it:

Change your podFile to have pod 'Google/Analytics', '~> 2.0.4'

I have no idea why the version 3.0.3 has this problem... Hopefully Google will fix this one day.

Dliix
  • 718
  • 1
  • 7
  • 20