I'm starting a new Swift project and I'm trying to create unit tests for it. I added the Google Analytics framework to the project and linked SystemConfiguration, CoreData, libsqlite3, libz, and libGoogleAnalyticsServices.
I then had to manually create a bridging header and added the GA headers I was going to use immediately. The app was up and running and posting to GA. I then tried to add some unit tests.
Once this happens I receive an error in my bridging header that 'GAI.h' file not found from the test target if I add a bridging header to it. I also receive a Segmentation Fault 11 error from the compiler. The error remains the same without a bridging header.
I have tried linking my test target with SystemConfiguration, CoreData, libsqlite3, libz, and libGoogleAnalyticsServices. This does not get rid of the error.
There is not much to my bridging header at the moment.
#import "GAI.h"
#import "GAILogger.h"
#import "GAITrackedViewController.h"
#import "GAIFields.h"
I'm also using cocoapods but I'm not using it with Google Analytics at the moment since there was so much I needed to manually change in the config files every time I would run the pod process. If it helps here is my pod file:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
pod 'JVFloatLabeledTextField'
# Swift Pods
pod 'Alamofire'
pod 'JSONHelper'
target 'example' do
end
target 'exampleTests' do
pod 'Quick', :git => "https://github.com/Quick/Quick"
pod 'Nimble', :git => "https://github.com/Quick/Nimble"
end
I haven't been able to write any tests yet because I'm not able to get passed the linker errors. Any ideas?
QuickandNimbleshould be in reverse order, followed byJumped over the candle stick.