IOs: Swift Google Analytics
I am new to iOS development and would like to implement Google Analytics (fast).
It looks like there is some missing information about Google Analytics implementation in the Google quick start page :
The above import statement seems to be wrong, can anyone help me with the missing / correct statement?
Additional Information:
- I am coming from a Java and IDE background that I am using for you, so please excuse my stupidity.
- I have cocopods installed and use other containers: Almofire, Fabric, swiftyJson, etc.
- I am developing for iOs 8
- The instructions above this are clear and work. Installing pods / config file etc.
source to share
If you look in the Pods folder in Xcode, you will see the containers available there. Most of them usually have a file containing all import statements for any required files. In this case, its Analytics.h file inPods/Google/Analytics/
My guess is that to import this file into the bridging header (which I hope you have, if you don't tell me) you can use #import "Google/Analytics.h"
.
He also says a little lower on the page to import <Google/Analytics.h>
in the header.
source to share
In your Objective-C header file, you must import the GA header files:
#import "GAI.h"
#import "GAIDictionaryBuilder.h"
#import "GAIEcommerceFields.h"
#import "GAIEcommerceProduct.h"
#import "GAIEcommerceProductAction.h"
#import "GAIEcommercePromotion.h"
#import "GAIFields.h"
#import "GAILogger.h"
#import "GAITrackedViewController.h"
#import "GAITracker.h"
I'm not sure if I'm missing the import.
source to share