이리저리/iOS

[iOS] IDFA, IDFV 정리

karza 2016. 10. 21. 14:37

IDFA 와 IDFV 에 관해 찾을일이 생겨서 찾은내용을 정리해 둔다.


(IDFA는 IGAWorks 홈페이지 참조하였다.)



IDFA(Identifier for Advertising) -


광고에 사용되는 식별자


iOS 6 ~ iOS 9 이하

디바이스에서 [설정 -> 개인정보보호 -> 광고] "광고 추적 제한"기능을 'ON'으로 설정할 경우 IDFA값은 보임

(그외 다른것들을 제한하는것으로 보임)


iOS 10

디바이스에서 [설정 -> 개인정보보호 -> 광고] "광고 추적 제한"기능을 'ON'으로 설정할 경우

해당 디바이스의 IDFA값이 모두 [00000-000-000000-00000] 형태로 변경


-> 식별에 사용할 수 없도록 되어버림


IDFA 확인 코드 (Objective c)

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000

    

    if (NSClassFromString(@"ASIdentifierManager"))

    {

        NSString * idfa = nil;

        NSUUID *advertiserId = [[ASIdentifierManager sharedManager] advertisingIdentifier];

        if (advertiserId)

        {

            idfa = [advertiserId UUIDString];

            NSLog(@"IDFA %@ : ", idfa);

        }

    }

    

#endif




IDFV(identifier For Vendor) -


애플 설명에 따르면 다음과 같다.

An alphanumeric string that uniquely identifies a device to the app’s vendor.

-> 앱 공급사의 식별번호


IDFV 확인 코드 (Objective c)

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000

    NSString *idfv = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

    idfa = [advertiserId UUIDString];

    NSLog(@"IDFV %@ : ", idfv);

    

#endif