The OpenUDID plugin and tracking purchased virtual items on my own server

Does the UDID plug-in still capture the device UDID (on iOS) or does it, instead, return the advertising equivalent? Does Apple allow us access to the UDID still? I didn’t think so.

The issue I have is that I keep track of virtual goods on my own game server. Without a UDID, I don’t know of any way to permenantly associate a device’s purchases without using Apple’s own game connector API.

I welcome and appreciate any good advice here.

Hi troylyndon,

sadly the same song for me :frowning:

I’ve try system.getInfo( “deviceID” ) not help because it return different ID each time the app is deleted/reinstalled.

I have also try the corona plugin openudid

https://docs.coronalabs.com/daily/plugin/openudid/getValue.html

but openudid.getValue() still return a zero sting “0000000000000000000000000000000000000000”

Tried also system.getInfo( “identifierForVendor” ) but still return  a blank string!

Do you have found some solution?

Thanks

Ale

Hi ale,

Firstly, “deviceID” is exactly what you should be using. On Android, it’s not a problem, yet. On iOS, Corona has had no choice but to bend to Apple’s policy - which prevents us from getting any kind of means to track a device after an uninstall and reinstall. This was done to protect user privacy from advertisers.

However, you can use the Apple GameCenter to keep track of a device by their name. And further, can you also use a social login or email login to allow gamers to get their past history from your game server, if you are keeping track as we are. We don’t use GameCenter - by having our own server, we have attempted to follow in the footsteps of King Ltd. We’ll know in a few months if it was worth the time and expense.

Best of luck and success to you.

Hi troylyndon,

thanks for the answer.

Yes, I understand the need to protect the user privacy, mainly from the advertiser, but in my case I’m working on a voting app that need to know a device id to avoid scams and frauds on voting results.

Uninstalling and reinstalling the app is a very easy way to bypass the voting controls and distort or invalidate the voting result.

I also thought to track the device name with

system.getInfo( "name" )

when the name is present, or an md5 code based on device name, but also in this case the user can change or delete the device name and bypass the vote control.

I’m looking to other solutions, like get the MAC address of the devices, but seem not so easy way to walk in lua.

Thanks anyway.

Ale

Ale, sounds good - please keep me posted as to what you find! The MAC address would be best!

Apple really doesn’t want you uniquely identifying people or devices without their explicit buy in (usually by some sort of login).  Lua isn’t the issue, you can’t even get the MAC address of an iOS device in Objective-C code :mellow:  

The closest you’ll find to what you want on iOS is iosIdentifierForVendor but you should make sure to read the Apple documentation that is linked to from there as it comes with some caveats.

Also, beware that, even if you think you’ve found the perfect workaround for Apple’s rules, they always have the option of rejecting your app in review.

Hi Perry, thanks for the answer.

Yes, regarding what Apple want or not about the people/device identification is absolutely clear for me. Also I know that using Objective-C I can get everything I need, but I have not Corona Enterprise and above all I have not the time to write a plugin at the moment.

After a lot of time spent investigating about some lua based solutions I relized that is not feasible, at least for my lua skills.

Then I have tried another quick and dirty solution that is working now.

I collect all the informations I can get regarding the device and I put all in a long string including the name of the device.

Then I get the MD5 from the long string using an external MD5 module. https://github.com/kikito/md5.lua
I believe that the crypto.md5 can be also used to perform this, but I’ not sure if crypto perform padding on long strings, this is the reason  I’m using an external module.

Then I can use the generated MD5 as a new UUID. :slight_smile:

I know that this is a “not so elegant” way and not a complete workaround because the user can try to change the name of the device and then reuse the app vote function, but I’m confident that not all the users will know or do this !!!

Of course this is working for me and is not valid for Android where the “deviceID” work fine.

This is the code I’m using:

local myApp    = require( "myapp" ) local md5 = require( "md5" ) local platformName = system.getInfo( "platformName" ) local platformVersion = system.getInfo( "platformVersion" ) local maxTextureSize = system.getInfo( "maxTextureSize" ) local deviceiD = system.getInfo( "deviceID" ) local model = system.getInfo( "model" ) local architectureInfo = system.getInfo( "architectureInfo" ) local name = system.getInfo( "name" ) print ("platformName --\>  ", platformName) print ("platformVersion --\>  ", platformVersion) print ("maxTextureSize --\>  ", maxTextureSize) print ("deviceiD --\>  ", deviceiD) print ("model --\>  ", model) print ("architectureInfo --\>  ", architectureInfo) print ("name --\>  ", name) if ( platformName == "Android" ) then     myApp.uuid = deviceiD else -- iOS     local longIds = platformName..platformVersion..maxTextureSize..model..architectureInfo..name     print( "Long string for MD5 -\> ", longIds )     myApp.uuid   = md5.sumhexa(longIds)   -- returns a hex string     print( "Encoded MD5  -\> ", myApp.uuid ) end    

Bye.

Ale

Hi troylyndon,

sadly the same song for me :frowning:

I’ve try system.getInfo( “deviceID” ) not help because it return different ID each time the app is deleted/reinstalled.

I have also try the corona plugin openudid

https://docs.coronalabs.com/daily/plugin/openudid/getValue.html

but openudid.getValue() still return a zero sting “0000000000000000000000000000000000000000”

Tried also system.getInfo( “identifierForVendor” ) but still return  a blank string!

Do you have found some solution?

Thanks

Ale

Hi ale,

Firstly, “deviceID” is exactly what you should be using. On Android, it’s not a problem, yet. On iOS, Corona has had no choice but to bend to Apple’s policy - which prevents us from getting any kind of means to track a device after an uninstall and reinstall. This was done to protect user privacy from advertisers.

However, you can use the Apple GameCenter to keep track of a device by their name. And further, can you also use a social login or email login to allow gamers to get their past history from your game server, if you are keeping track as we are. We don’t use GameCenter - by having our own server, we have attempted to follow in the footsteps of King Ltd. We’ll know in a few months if it was worth the time and expense.

Best of luck and success to you.

Hi troylyndon,

thanks for the answer.

Yes, I understand the need to protect the user privacy, mainly from the advertiser, but in my case I’m working on a voting app that need to know a device id to avoid scams and frauds on voting results.

Uninstalling and reinstalling the app is a very easy way to bypass the voting controls and distort or invalidate the voting result.

I also thought to track the device name with

system.getInfo( "name" )

when the name is present, or an md5 code based on device name, but also in this case the user can change or delete the device name and bypass the vote control.

I’m looking to other solutions, like get the MAC address of the devices, but seem not so easy way to walk in lua.

Thanks anyway.

Ale

Ale, sounds good - please keep me posted as to what you find! The MAC address would be best!

Apple really doesn’t want you uniquely identifying people or devices without their explicit buy in (usually by some sort of login).  Lua isn’t the issue, you can’t even get the MAC address of an iOS device in Objective-C code :mellow:  

The closest you’ll find to what you want on iOS is iosIdentifierForVendor but you should make sure to read the Apple documentation that is linked to from there as it comes with some caveats.

Also, beware that, even if you think you’ve found the perfect workaround for Apple’s rules, they always have the option of rejecting your app in review.

Hi Perry, thanks for the answer.

Yes, regarding what Apple want or not about the people/device identification is absolutely clear for me. Also I know that using Objective-C I can get everything I need, but I have not Corona Enterprise and above all I have not the time to write a plugin at the moment.

After a lot of time spent investigating about some lua based solutions I relized that is not feasible, at least for my lua skills.

Then I have tried another quick and dirty solution that is working now.

I collect all the informations I can get regarding the device and I put all in a long string including the name of the device.

Then I get the MD5 from the long string using an external MD5 module. https://github.com/kikito/md5.lua
I believe that the crypto.md5 can be also used to perform this, but I’ not sure if crypto perform padding on long strings, this is the reason  I’m using an external module.

Then I can use the generated MD5 as a new UUID. :slight_smile:

I know that this is a “not so elegant” way and not a complete workaround because the user can try to change the name of the device and then reuse the app vote function, but I’m confident that not all the users will know or do this !!!

Of course this is working for me and is not valid for Android where the “deviceID” work fine.

This is the code I’m using:

local myApp    = require( "myapp" ) local md5 = require( "md5" ) local platformName = system.getInfo( "platformName" ) local platformVersion = system.getInfo( "platformVersion" ) local maxTextureSize = system.getInfo( "maxTextureSize" ) local deviceiD = system.getInfo( "deviceID" ) local model = system.getInfo( "model" ) local architectureInfo = system.getInfo( "architectureInfo" ) local name = system.getInfo( "name" ) print ("platformName --\>  ", platformName) print ("platformVersion --\>  ", platformVersion) print ("maxTextureSize --\>  ", maxTextureSize) print ("deviceiD --\>  ", deviceiD) print ("model --\>  ", model) print ("architectureInfo --\>  ", architectureInfo) print ("name --\>  ", name) if ( platformName == "Android" ) then     myApp.uuid = deviceiD else -- iOS     local longIds = platformName..platformVersion..maxTextureSize..model..architectureInfo..name     print( "Long string for MD5 -\> ", longIds )     myApp.uuid   = md5.sumhexa(longIds)   -- returns a hex string     print( "Encoded MD5  -\> ", myApp.uuid ) end    

Bye.

Ale