Reputation: 55
I am trying to add Google Analytics to my iOS app. I have added all the right frameworks to Xcode. I followed through the SDK v3 startup guide. But when I added:
self.trackedViewName = @"About Screen";
to my viewcontroller
, I got an error saying
Property
trackedViewName
not found on object of typeViewController
On my .h
file, I imported GAITrackedViewController.h
and added GAITrackedViewController
to the interface.
What do you think the problem could be?
Upvotes: 3
Views: 1370
Reputation: 93
Check the answer from here: https://developers.google.com/analytics/devguides/collection/ios/v3/migration
Users of Automatic Screen Tracking should replace references to GAITrackedViewController.trackedViewName with GAITrackedViewController.screenName.
Upvotes: 1
Reputation: 9
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol GAITracker;
@interface GAITrackedViewController : UIViewController {
@private
id<GAITracker> tracker_;
NSString *trackedViewName_;
}
@property(nonatomic, assign)id<GAITracker> tracker;
@property(nonatomic, copy)NSString *trackedViewName;
@end
Paste this code on GAITrackedViewController.h
file.
Then you can use self.trackedName = @"Some Name";
easly.
Upvotes: 1
Reputation: 8444
You can try screenName
instead of trackedViewName
self.screenName = @"About Screen";
This solved my issue.
Upvotes: 8