Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google/Analytics.h file not found when Testing

I am including the BridgingHeader.h however on importing Google/Analytics.h it can't find the file.

This works fine in the application, it only throws the error under testing.

Not sure what the issue is so any insight would be greatly appreciated.

enter image description here

like image 658
Christopher Wade Cantley Avatar asked Sep 29 '15 16:09

Christopher Wade Cantley


1 Answers

I had a similar issue and fixed it by adding the Google Analytics pod to both the tests and uitests targets by opening up your podfile and modifying it as shown:

target 'MyApp' do
pod 'Google/Analytics'
end

target 'MyAppTests' do
pod 'Google/Analytics'
end

target 'MyAppUITests' do
pod 'Google/Analytics'
end

Once that was complete I had to run pod install twice and then it worked.

like image 120
Sir Cringe Avatar answered Sep 18 '22 17:09

Sir Cringe