Brian Coleman

  • Home
  • ABOUT
  • SERVICES
  • PORTFOLIO
  • BLOG
  • Contact

How to use Apple’s Identifier for Advertisers (IDFA)

On the first of May, 2013, Apple began rejecting any app or app update in the App Store if it accessed UDIDs, moving app developers towards its own preferred ad tracking option, the Identifier for Advertisers (IDFA). IDFA stands for “identifier for advertisers.” It’s a random, anonymous number that is assigned to a user and their device. It is temporary and can be blocked, like a cookie.

If you need to uniquely identify a user, read below on how you can access the IDFA.

Retrieve iPhone IDFA

You first have to check if user user has decided to opt out from ad tracking. Only if he allowed it you use the IDFA.

You can check it by calling isAdvertisingTrackingEnabled method of ASIdentifierManager.

isAdvertisingTrackingEnabled

Check the value of this property before performing any advertising tracking. If the value is NO, use the advertising identifier only for the following purposes: frequency capping, conversion events, estimating the number of unique users, security and fraud detection, and debugging.

ios7-privacy-advertising

The following code snippet shows how to obtain a string value of IDFA.

- (NSString *)identifierForAdvertising
{
   if([[ASIdentifierManager sharedManager] isAdvertisingTrackingEnabled])
   {
       NSUUID *IDFA = [[ASIdentifierManager sharedManager] advertisingIdentifier];

       return [IDFA UUIDString];
   }

    return nil;
} 

You’ll need to link with AdSupport framework. If you only target iOS 7 and above, you can add it using modules.

@import AdSupport;

How to Submit Your App When it Uses IDFA

Before you submit a new app or a new version of an existing app to Apple’s App Store, note that Apple has recently updated the IDFA settings so that you must agree to their revised terms of service by selecting a check box that indicates your compliance.

When you submit your apps with iTunes Connect, you’ll now be prompted with three checkboxes certifying your intentions to use IFA for:

  • Serve advertisements within the app.
  • Attribute this app installation to a previously served advertisement.
  • Attribute an action taken within this app to a previously served advertisement

To avoid app store rejections, ensure that you select the appropriate IDFA usage check-boxes for your app and honor Apple’s “Limit Ad Tracking” requirement.

IDFA_Page2-1

Play LED BaseballLearn Swift by Video
Brian Coleman

Manager, Mobile Development at Rogers Communications with over 15 years of multifaceted experience including development, design, business analysis and project management working directly with clients in a consulting capacity throughout the full software life cycle.

July 14, 2014 Tutorialsapple, ios, objective-c, tutorials
Follow Me
    
Categories
  • About Me
  • Frameworks
  • My Apps
  • News
  • Strategy
  • Swift
  • Tools
  • Tutorials
  • tvOS
  • Uncategorized
  • Videos
  • Watch
Archives
  • May 2016
  • January 2016
  • October 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • November 2014
  • October 2014
  • September 2014
  • July 2014
  • June 2014
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
Recent Posts
  • Classix for iPhone, iPad & Apple TV
  • Tutorial: How to test your app for IPv6 compatibility
  • Tutorial: Testing SSL using Charles Proxy on an iOS Device
  • Tutorial: 3D Touch – Quick Actions in Swift
  • tvOS Tutorial: Top Shelf in Swift
Featured Apps
Classix
Sportsnet
TAGS
tutorialswiftios8iosobjective-cvideogamesstrategynewsframeworkappsmonitizefacebookwatchappleios7toolstvosios9apiprovisionsocialtutorialsbooksdesignbookiapIPv6iTunes Connect
Search
TAGS
tutorialswiftios8iosobjective-cvideogamesstrategynewsframeworkappsmonitizefacebookwatchappleios7toolstvosios9apiprovisionsocialtutorialsbooksdesignbookiapIPv6iTunes Connect
ABOUT
Brian is a Lead iOS/tvOS Developer from Toronto with over 18 years of multifaceted experience including development, design, business analysis and project management.

FOLLOW ME
    
Email Subscription
Sign up for my newsletter to receive the latest news and tutorials posted.

Enter your email address:

2023 © Brian Coleman