---
title: iOS device ID obfuscation
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-ios/configuration/ios-device-id-obfuscation
---

New Relic uses Apple's [vendor ID](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor) to track specific devices for accurate counts of users. One of the special features of the vendor ID is it is unique across a suite of apps using the same bundle ID base. For example, the vendor ID is the same across apps that use the same bundle ID: `com.company-name.*` .

This article describes how to obscure this cross-app identifier using a hidden API (available in iOS agent version 6.11.0):

```objectivec
+[NewRelic saltDeviceUUID:(BOOL)enabled]
```

## Enable device uuid salt [#h2_code]

To access the hidden method `+[NewRelic saltDeviceUUID:(BOOL)enabled]`, add a category to the `NewRelic` object:

```cpp
@interface NewRelic (salt)
  + (void) saltDeviceUUID:(BOOL)enabled;
@end
```

This can be added in your `AppDelegate.h` after `#include <NewRelic/NewRelic.h>` and before the `@implementation AppDelgate`:

```cpp
//
//  AppDelegate.m
// 
//  Created on 9/11/12.
//  © 2012 New Relic, Inc. All rights reserved.
//

#import "AppDelegate.h"
#import <NewRelic/NewRelic.h>

@interface NewRelic (salt) 
  + (void) saltDeviceUUID:(BOOL)enabled;
@end

@implementation AppDelegate
// code 
@end
```

## Call the API [#make-the-call]

Next, call `[NewRelic saltDeviceUUID:YES];` before your `[NewRelic startWithApplicationToken:]`

```cpp
// 
// AppDelegate.m 
// 
// Created on 9/11/12. 
// © 2012 New Relic Inc. All rights reserved. 
//

#import "AppDelegate.h"
#import <NewRelic/NewRelic.h>

@interface NewRelic (salt)
+ (void) saltDeviceUUID:(BOOL)enabled;
@end

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [NewRelic saltDeviceUUID:YES];
  [NewRelic startWithApplicationToken:@"MY_TOKEN"];

  ...
}

...

@end
```

You device IDs are now be obfuscated in all events and data sent to New Relic.
