-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this actually, you know, work? #1
Comments
My tests were indeed not thorough enough. I tested across two distinct apps but compiled with the same certificate (same TLD bundle identifiers)... I need to do more testing. I'm afraid you might be right... |
I was wondering the same thing. Oddly it does seem to work on the simulator (build two apps with the library and both seem to get the same UDID). Tried it on a 4.2 device and got different IDs. I haven't updated my phone to 5.0beta, but someone would have to try that, but seems very likely that this doesn't work.... |
ok guys, I concur. Keychain is a no go across apps with a different certificate... #fail |
Hadn't seen the pasteboard, but very interesting... you can actually persist it across reboots. Let us know what you see, very interested in this. Other off-the-wall possibilities: -iCloud (kv or documents), but it seems hard to share iCloud data across apps from different teamids. Haven't dug into that. |
Ok, looks like it's working. Code is actually simpler and no longer depends on the Security framework. |
UIPasteboard is an option. The first app that includes this code will look for a shared pasteboard at the "org.openudid.udid". If it exists, it uses that. If it doesn't, it creates one and sets it. The show-stopper with that is if the first application gets deleted, the shared pasteboard dies too. The next app to open up would then re-create the pasteboard with a new UUID. Not good. Here's a (crazy) workaround solution. The first app goes through the following pasteboards looking for a UUID. "org.openudid.0", "org.openudid.1", "org.openudid.2", etc. all the way up to some number which represents the number of concurrent apps on the system that can support this. Two possibilities:
You'll also want to do some kind of defragmentation. When your app launches it should check to see if there isn't a lower slot it could occupy (signifying another app was deleted). If there is, it moves it's UUID to a lower slot and updates the cached prefs slot. I might take a crack and implementing next week if there are no takers. |
@zac, the obvious issue; what if you delete apps 1 to N (where N being how high it will check before deciding there are no apps, and resorting to creating a new one), without ever opening apps N+1 to M to cause defragmentation? You can never check high enough with that system. Solution: † If you try to decrement |
cough Greasy hack cough |
Hi Zac. Our messages crossed. I just finished implementing the UIPasteboard version. I was also thinking about a distributed persistence managed by each individual subscriber app in the event the pasteboard does indeed vanish. I'll get to it by Monday. |
@ylechelle See Zac's comments. If the app that creates the pasteboard is deleted the data is lost for ALL apps. Zac has a lot of experience hacking with the pasteboard. I'd definitely take his advice to heart if I were you. |
of course; DragKit ;-) Hats off @zac.
more later... |
Is there any reason why the MAC address of en0 (and/or en1) aren't used as the seed. MAC addresses are historically unique - combining two if available as a seed for a hash (SHA1 perhaps) would yield the same value for a given device. It can be independently calculable in each process. |
Once you're using the MAC address you're back to why Apple deprecated UDID in the first place... There are some privacy issues related to distributing a MAC address even if it has been salted & hashed. |
Agreed. And Apple could equally decide to deprecate access to it. On 2-Sep-2011, at 7:17 AM, schwa wrote:
|
I see - somehow I thought that the object of the exercise was to build an algorithm that was recomputable and unique. Isn't the point of OpenUUID itself opening up privacy issues? Perhaps Apple would just ban any application that consumes this code? I'm intrigued by the comment that the MAC address is somehow special as a unique value that shouldn't be used salted & hashed, have any recommended reading on that topic? |
Actually, the object of the exercise was to build a process that was no necessarily recomputable because MAC address or indeed the original UDID are private and hardcoded addresses. MAC addresses are used for Wifi security and other things like VPN, etc... it shouldn't be shared in the wild, even salted & hashed. Too sensitive. A persistent and 99.9% unique key that can be shared across vendors which can also be opted- or wiped-out is a good enough proxy for what the industry needs. |
One comment on the loss of the pastebin when deleting apps: I see that is in the documentation, but when I test that it seems to persist even though I deleted the app that created it. I can try rebooting as well, but has anyone verified this? |
tested in Simulator or device? on the device, the pasteboard was lost for me. |
@zac has the correct suggestion. |
Ah, never mind, just "rediscovered" the #if TARGET_IPHONE_SIMULATOR in the code. |
i doubt that
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); //// get udid from iphone device? please description this code, how it work Thank you |
CFUUIDCreate(kCFAllocatorDefault) creates a random UUID here, not a UDID. |
i want to know that OpenUDID algorithm get the UDID from IPhone devices to generate new UDID ? if i uninstalled app and re-install again, the UDID will change or not? |
|
i want to know that openUDID will generate redundant UDID with another device or not? |
According to the project agenda in the README:
I assume this means the SAME OpenUDID for all apps that use it? How is that possible? The keychain does NOT allow sharing of keychain data between apps unless they belong to the same Keychain Access Group. See http://developer.apple.com/library/mac/#documentation/Security/Reference/keychainservices/Reference/reference.html for more information - but the gist of it is only apps released by one develop can share keychain items.
Without the ability to share the OpenUDID between apps you've really just re-invented CFUUIDCreate.
The text was updated successfully, but these errors were encountered: