IOS Device ID Getter is Deprecated

I can’t get unique device ID from an IOS device. Ready to use “Get Device Identifier” function doesn’t work as expected anymore. It is returning different values every time I reinstall the game. Since iOS 7, this function became “installation ID”, instead of “device ID”. This is a bug because this function doesn’t provide a device ID anymore.

Please have a look at this thread: How to get unique id in iOS device? - Stack Overflow

Please open a bug report for this.

And a question, how can I work this around?

I need device ID to provide these functions:

1- Keep users data even if he reinstalls or somehow losts data.

2- Ban cheaters by device ID (unless he learns a way to change device ID)

3- Prevent “save game” downloaders, by making save game files device specific.

Hey ,

Have you tried?

FString FIOSPlatformMisc::GetUniqueDeviceId()

Thanks.

No I didn’t try, but as far as I’ve seen in the c++ code, this is what I was looking for. Thanks :slight_smile:

Similar, actually even worse problem is occuring in Android too. I used this function to work this around: Is there anyway to get a Unique device ID on Android? - Blueprint - Epic Developer Community Forums

It looks like FGenericPlatformMisc::GetUniqueDeviceID() is returning mac address but I think OS companies don’t like sharing their users mac addresses anymore.

To keep the node compatible with old developers and for more flexible design, I think more developed “Get Unique Device ID” node would be better. There can be options on it like these:

bool Use Vendor ID if IOS

bool Use New Method if Android

Edit: It looks like identifierForVendor and mac address are providing the same functionality, they both reset when I reinstall the game. I don’t know how can I protect my game server from cheaters with this situation. It is very open to abuse.

However, there is a better variable for this but I don’t know how to get it from Unreal Engine: advertisingIdentifier. ios - Under what conditions is Apple's 'advertisingIdentifier' reset? - Stack Overflow

It can be reset too, but not by reinstalling the game. It doesn’t provide proper ban functionality but at least can define the device for a longer time. I don’t know whether this is legal or not, if I use advertisements but use this for different purposes.

Hey ,

While I do understand your issue of wanting to protect your game with identifiers from the device, this doesn’t mean that it is a bug with the Unreal Engine. However, thank you for the report. If you still believe this may be a bug, please provide steps for us to reproduce the issue, and we will continue our investigation.

To clarify, “A bug is a defect in the engine code which results in an unexpected behavior, and can be reproduced under specific conditions.”

If you would like to include a feature request, such as adding or updating code, you can make a new thread in the “Feedback for Epic” section.

Lastly, as some general feedback to your issue, I would suggest looking into a way to create a account for your game. This way you can keep track of your base via a login page, giving you some administration control over who can login to your game.

Hi, we are trying to use device ID on a mobile VR game. GetUniqueDeviceID always return exactly the same string -d41d8cd98fOOb204e9800998ecf8427e- on every single mobile device we tested. Does this only work on PC? Is there a function for android phones?
We are forced to use this because your function for getting Oculus identity also only work on PC but not on mobile.

,

“In iOS 7 and later, if you ask for
the MAC address of an iOS device, the
system returns the value
02:00:00:00:00:00. If you need to
identify the device, use the
identifierForVendor property of
UIDevice instead. (Apps that need an
identifier for their own advertising
purposes should consider using the
advertisingIdentifier property of
ASIdentifierManager instead.)”

The identifierForVendor property will give you a value that is unique for a given software application on a per device granularity. This enables a software vendor to uniquely identify a particular device among other devices, but it does not provide information about the particular device that happens to be, such as a MAC address would.

Any fix for this?

It looks like this is what the engine uses now, however my iPad and iPhone are both reporting the same value (d41d8cd98fOOb204e9800998ecf8427e).

FString FIOSPlatformMisc::GetDeviceId()
{
	// Check to see if this OS has this function
	if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)])
	{
	    NSUUID* Id = [[UIDevice currentDevice] identifierForVendor];
	    if (Id != nil)
	    {
		    NSString* IdfvString = [Id UUIDString];
		    FString IDFV(IdfvString);
		    return IDFV;
	    }
	}
	return FString();
}

I am using deprecated blueprint function “Get Unique Device ID” and it is working fine, because IOS is sending vendor id even if I request MAC address. However I don’t know whether you can add deprecated function nodes in blueprints, or not.

Did you try new function? “Get Device ID”

Hi, did you try resetting your vendor id? Maybe IOS is giving same id to same accounts.