I would like to get the device IDFA
. How to get this info from iOS official API ?
First of all:
#import <AdSupport/ASIdentifierManager.h>
If you would like to get it as an NSString, use:
[[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]
So your code might look like this:
NSString *idfaString = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];