Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 676 Bytes

2014-09-23-fix-enable-display-features.md

File metadata and controls

22 lines (17 loc) · 676 Bytes
title date layout tags
Fix to Enable Display Features - Google Analytics iOS SDK
2014-09-23 00:00:00 UTC
post
code

In the official Google Analytics iOS SDK documentation, this function call will enable Display Features in your app:

id tracker = [[GAI sharedInstance] defaultTracker]; // Enable Advertising Features. 
[tracker set:allowIDFACollection value:@YES]; 

Sadly, this causes an error, as allowIDFACollection is an invalid key. The real way to enable display features is to call this method:

[[GAI sharedInstance].defaultTracker setAllowIDFACollection:YES]; 

Save yourself a few minutes of frustration. Build and be happy.