IDFA / ASIdentifierManager not found

1k views Asked by At
if ( NSClassFromString(@"ASIdentifierManager"))
    {
        limitAdTracking = !ASIdentifierManager.sharedManager.advertisingTrackingEnabled;
        idfa = [ASIdentifierManager.sharedManager.advertisingIdentifier UUIDString];
        userDict[@"limit_ad_tracking"] = @(limitAdTracking);
    }

I have SDK. This sdk uses in different apps. But sometimes My SDK doesn`t get idfa. It can happen in one version of application (one time I get, one time - nope). What can happen?

1

There are 1 answers

0
Rob Jones On

If your App was not linked against AdSupport.framework, then NSClassFromString(@"ASIdentifierManager") will return nil and you'll never get the IDFA.

Is it possible you added/removed AdSupport.framework between the versions that exhibit different behavior?