Using cocoa pods 0.37.0 in a Swift project, with use_frameworks! set in the podfile, I am unable to access the header files for the GoogleAnalytics-iOS-SDK pod.
How should I access the Google Analytics pod's headers in my app?
I have tried;
import GoogleAnalytics_iOS_SDK
In a Swift file, cocoapods 0.36 style. But there's no framework created anymore so no good.
#import <GoogleAnalytics_iOS_SDK/GAI.h>
In the bridging header, but doesn't work (no module map ?)
I have read that the behaviour for pods that only include headers in their 'sourse_files' changed in cocoapods 0.37 (see this commit). This appears to be in response to the problems that use_frameworks caused with these pods in 0.36 (see this SO question).
With this change in Cocoapod behaviour, the static library is integrated correctly (it wasn't with 0.36), the symbols are compiled into the app and available at runtime. But I don't have access to the headers.
This is a bug in Cocoapods 0.37.0. It has been logged in their tracker as issue #3499.
Workaround
$(SRCROOT)/Pods/GoogleAnalytics-iOS-SDK
to the User Header Search Paths
(set to Recursive) in the app target's Build Settings
.#import "GAI.h"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With