Last modified November 22, 2014 by Shelly Wolfe

Do Swrve SDKs use advertising identifier in iOS?

The Swrve SDK does not use the IDFA as of version 2.0.1. New submissions to the app store using older versions of the Swrve SDK may be rejected by Apple, so Swrve strongly recommends updating to the latest SDK. If you can’t upgrade to the latest Swrve SDK, follow the instructions below.

If you upgrade your Swrve SDK or apply the workarounds below and you still experience problems, check the other third party libraries you are using. It’s possible that these libraries are accessing the IDFA.

Disabling advertising identifier in iOS SDK pre-2.0.1

Stop pre-2.0.1 iOS SDKs from collecting the Advertising Identifier by commenting out the following code in swrve.m and re-compiling your app.

// Comment out header
// In swrve.m
//#include <AdSupport/ASIdentifierManager.h>

// Comment out access in _swrve_init_linkingstatic void _swrve_init_linking(Swrve* swrve, CFStringRef server){   ...
//    if (rule_not_set(swrve->config->identifier_rules, SWRVE_DO_NOT_SEND_ADVERTISING_IDENTIFIER))
//    {
//        if (NSClassFromString(@"ASIdentifierManager"))
//        {
//            CFStringRef idfora = (__bridge CFStringRef)[[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
//            swrve_set_associated_identifier(swrve, &swrve->associated_ids.advertising_identifier, idfora);
//        }
//    }   ...}

Disabling advertising identifier in Unity SDK pre-2.8.2

Stop pre 2.8.2 Unity SDKs from collecting the Advertising Identifier by commenting out the following code in SwrveSDK.cs, SwrveSDKImpl.cs and re-compiling your app.

// In SwrveSDK.cs// Comment out DLL Import
//    [DllImport ("__Internal")]
//    private static extern string _swrveiOSGetIdentifierForAdvertiser();
// In SwrveImpl.cs
//#if UNITY_IPHONE
//        if (string.IsNullOrEmpty(deviceLinkToken)) {
//            try {
//                deviceLinkToken = _swrveiOSGetIdentifierForAdvertiser();
//            } catch (Exception exp) {
//                SwrveHelper.LogWarn("Couldn't get identifier for advertiser on iOS, make sure you have the plugin inside your project and you are running on a device: " + exp.ToString());
//            }
//        }
//#endif