I am starting a new Swift project and I am trying to create unit tests for it. I added a Google Analytics framework to the project and linked SystemConfiguration, CoreData, libsqlite3, libz, and libGoogleAnalyticsServices.
Then I had to manually create the bridge header and add the GA headers that I was going to use immediately. The application was launched and sent to GA. Then I tried to add some unit tests.
As soon as this happens, I get an error in my header header, which is 'GAI.h' file not found from the test target, if I add a bridge header to it. I also get a Segmentation Fault 11 error from the compiler. The error remains unchanged without a bridging header.
I tried to link my test target with SystemConfiguration, CoreData, libsqlite3, libz and libGoogleAnalyticsServices. This does not eliminate the error.
At the moment, my bridge header is not so much.
#import "GAI.h" #import "GAILogger.h" #import "GAITrackedViewController.h" #import "GAIFields.h"
I also use cocoapods, but I do not use it with Google Analytics at the moment, as there were so many that I had to manually change the configuration files every time I started the swap process. If this helps here, my swap file:
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.1' pod 'JVFloatLabeledTextField'
I have not been able to write any tests yet because I could not get the linker errors. Any ideas?