• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Objective C How to set to TRUE? @property(nonatomic) BOOL allowIDFACollection;

C

Chris Goodwin

Guest
In the Google Analytics extension I need to enable IDFA tracking for iOS, but I am not familiar with Objective C. How would I turn on the tracker in the code below?

/*!
Allow collection of IDFA and related fields if set to true. Default is false.
*/
@property(nonatomic) BOOL allowIDFACollection;

Note: This file is found in the Google Analytics extension folder in the GAITracker.h file.
Thanks!
 
C

Chris Goodwin

Guest
From Support:
Hi,

In the same file (GoogleAnalyticsExt\iOSSource\GoogleAnalyticsSDK_3.09\GAITracker.h) there is a readonly value that has a get and set function, you could create your own get/set functions if you wish however as allowIDFACollection is not readonly, you should be able to simply set the value after the tracker has been created.

We do not have anything built in to allow this to happen but you are free to make changes to the extension for your own use if you need to. This would likely require you to gain some familiarity with C or you may be able to get advice from other users on our forum.
My question still remains, how would I set it to true?

Would it be done like this:

//Create
@property(nonatomic) BOOL allowIDFACollection;

//Set
allowIDFACollection = YES;
(is this line valid?)

Do I need to add a #define before it?
#define allowIDFACollection = YES;

Thanks!
 
Last edited by a moderator:
Top