@JonB , this thread is 10 months old. Just off the top of your head do you know if your last response is still valid?
On the latest py3 beta (today's release, and iOS 10.02) your code listed below works.
But if possible what I would like to know, does the returning uuid contain anything that could be broken down and be used in a malicious way. Eg, uuid1 contains the hardware network address (I guess for the current network adapter, but I am not sure.)
Anyway, my reason too look at this again is a little different.
It's about if I wrote a small app in pythonista that would talk to a web hosted simple bottle app. And let's say all the app did was present a topic you could vote on. The app would send the response the the bottle app. But of course like to limit the votes to a certain question to one per user (lossley speaking). So I was thinking using the function you showed to do that.
I think the biggest issue is if someone was to hit the button in my app after I shared it in the Forum , are they sharing any details that could be exploited. Of course I would not, but it's not the point. So, that's what I am after, a way to identify a user without receiving any compromising data.
I am not trying to make a cheat proof system, just something semi reasonable that identifies a user without compromising their security and without having to ask for user names etc.
I have mentioned before, I think it would be a great idea if Pythonista had a in built API KEY with a module that could do some handshaking and access/connect dialogs same as iOS modules, photos/contacts etc...
I addressed this to @JonB as he provided the solution in the thread, for a different but related question. But happy to hear from anyone on this subject. As it involves people's security(my own included), I am only looking for Well understood solutions. I understand a few things from reading, but not enough. Like I know uuid4 is safe as it's totally random. But does not help like a cookie. Also I read about UDID which seems to be depreciated now. I guess that also had security flaws.
Anyway, i hope I can get a safe answer to this question. I think many here could benefit from the answer also
import objc_util
id = str(objc_util.ObjCClass('UIDevice').currentDevice().identifierForVendor().UUIDString())
print(id)