Short of jailbreaking, does a UDID ever change on an iDevice? - iphone

I have a beta tester to whom, 4 months after the last beta test cycle, I sent a new versions' first beta test of an app. When she said that it wouldn't load, we checked her UDID, and it is different than what we used 4 months ago, so my provisioning clearly didn't work.
She says it's the same device used before.
I've yet to further explore what upgrades she might have done or if she (or maybe her child?) has jail-broken it.
Are there any Apple sanctioned actions that would change the UDID on a device?
If you jail break a device, do you need to take further action (e.g., install something with code like UDIDFaker) for the UDID to change?
Thanks!
Henry

I didn't find any official word on whether the UDID can change.
But the documentation, while not being explicit, says the following (in UIDevice Class Reference):
A UDID is a hash value composed from various hardware identifiers such as the device serial number. It is guaranteed to be unique for each device. The UDID is independent of the device name. For devices that use a SIM (subscriber identity module) card, the UDID is independent of the SIM card.
Based on this, I continue to assume that the UDID of a device never change.
You might ask your beta-tester if the device was repaired by Apple, or (more likely), if she changed her device in between. If the device was "repaired", its not impossible that Apple just swapped it with a new one, and she did not realize.

No, the Unique Device ID will always stay the same, and the property is read-only, as you mentioned other than jailbreaking and spoofing a UDID.
Apple has to have a way to identify millions of devices uniquely, so this is why they created the UDID.

UDID can't be modified. You can "change" it for one application for example, it's called spoofing, but it's not permanent - it's useful for debugging for example (swizzling - replace method with custom implementation).

Related

iOS Unique Identifier

How are we supposed to uniquely identify devices now that the UDID has been deprecated? I need to be able to uniquely identify a device even if the user uninstalls my app and then reinstall it. The new identifierForVendor doesn't work for this purpose because it will randomly generate again once the user uninstalls the app. I also can't use the MAC address to identify the device because it doesn't work in iOS 7.
The advertisingIdentifier seems to work for my purposes but I heard that if you're not actually using it for advertising Apple will reject your app?
Does anyone know of a way to reliably identify a device?
According to Apple, you should be using the vendor or advertising identifiers. Vendor doesn't work for you obviously, but you are fine to use advertisingIdentifier.
The advertisingIdentifier seems to work for my purposes but I heard that if you're not actually using it for advertising Apple will reject your app?
They are not currently rejecting apps for using avertisingIdentifier in place of uniqueIdentifier as a device ID. I just had a version of my app approved that uses advertisingIdentifier for purposes other than advertising. A bigger negative is that users can change this identifier any time they like, which is guaranteed to mess up your reporting.

Way to get UDID of all devices in which my app is installed

In my app, I want UDID of all the devices in which my application is installed. Can i get this ?
Is there any way to get UDIDs ?
Thanks for any help.
I am pretty sure you can't get the UDID from each device your app is installed on. That would open up possibilities to privacy breach - I am sure. You can only get the UDID of the device you are holding in your hand, or if someone sends you their UDID. However in iOS 6 Apple is moving away from the UDID system.
You can get UIID by NSLog(#"%#",[[UIDevice currentDevice] uniqueIdentifier]);
I want UDID of all the devices in which my application is installed.
You can get UIIDs by web service. You need to write a web service to send UIID to your server.
Use of UDID is deprecated, and replaced by UUID.
If you require to collect this, your app will need to make a HTTP connection to a server and record this information (usually in a database).
It depends on what you mean. Do you mean the old UDID for iOS devices, or just a unique identifier for each device?
If it's the latter, see answers to this question.
As I posted in my answer, there is a new NSUUID method you can use.
After you app reads this, of course, you would probably want to post it to your web server for storage.

iOS Provisioning Profile not installing on one particular device

I recently have distributed an app for testing, and the test team are having a problem installing the app, more specifically the provisioning profile associated with the app.
They are using an iPhone 4 (iOS 5.1.1) and are getting "Could not install the provisioning profile due to an unknown error"
I am used to seeing this when a UDID is not registered against the profile which is trying to be installed, but they are adamant that they have supplied the correct UDID. In terms of the profile, both looking at provisioning on the iOS Dev account, and opening in a text editor confirms that the UDID that has been supplied is definitely present.
My question is, are there any known issues (other than wrong UDID supplied) which could cause this to occur on a device, even if that device is authorised to install that particular provisioning profile?
Thanks
This won't answer your question because your problematic device is iOS-5.1, but it may help lots of other people:
Another possible issue since iOS7 is where did you find UDID. As Apple says:
In iOS 7, apps that are already on the store or on users’ devices that call this removed API will no longer be returned the UDID. Instead, -[UIDevice uniqueIdentifier] will return a 40-character string starting with FFFFFFFF, followed by the hex value of -[UIDevice identifierForVendor].
Consequetly, check the UDID your client/collaborator sends to you: if it begins with FFFFFFFF, thats a wrong one.
The only & unique method to get UDID under iOS7 is to plug your device to a computer, launch iTunes (or Xcode) and copy the displayed UDID.
Looks like the UDID which is generated programmatically gives a random alphanumeric code from iOS 7. So to make sure you are using the right one, connect it to iTunes and then copy the UDID.
There may be few reasons behind that because information is not enough so i can just guess -
If you're getting any boot strap error in console then delete app from device then switched OFF your device then ON and try again.
May be in your device there is already an app having same profile so your app would overwrite on previous one and new app would not be install.
Last It might be provisioning profile issue. Make it again.

Has anyone had their iOS App rejected by Apple for using the devices UDID?

I have heard some rumours that Apple is rejecting apps for using the iOS5 deprecated method [UIDevice uniqueIdentifier]. Can anyone confirm that they have had their App rejected for this reason? I know of the alternatives to using this deprecated method, but one of our customers is requesting we use a 3rd party library that we know uses this method.
I would be surprised if this is the case as the API method has been deprecated and not made private.
Apple is not rejecting apps because of this. I collect device UDIDs along with tokens within my apps that support push notifications and they have all been approved. UDIDs are simply deprecated, meaning that Apple will eventually not allow you to access them. Everything still works and will be approved.
I heard that Apple deprecated access to UDIDs to prevent developers and third party analysts from being able to identify specific people. If it truly was because of issues with iCloud, Apple would clearly have fixed this instead of inconveniencing everyone else.
Edit: It looks like Apple is rejecting some apps for accessing the device's UDID. Just to be safe, I would use CFUUID to create a random unique identifier. You can use NSUserDefaults or the keychain to save it. The advantage to the keychain is that if the user deletes your app, the keychain items are not deleted so you can still access the UDID if the user reinstalls your app. It will only get deleted if the user restores their device.
Using Identifiers in Your Apps
Starting May 1, the App Store will no longer accept new apps or app updates that access UDIDs. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6. You can find more details in the UIDevice Class Reference.
Source: https://developer.apple.com/news/
It appears that App Review is enforcing this rule on apps that transmit the UDID without getting the user's permission -- as suggested by this post -- rather than ones that simply invoke the deprecated API.
We had an update in review for an app that would send the device UDID to our server, on which we would use it to index the user's account. We decided not to take any chances and change our code to generate an app-specific unique identifier, as proposed by documentation on the deprecation of the UDID
now Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6
NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];
and must to add ADSupport framework
Since May 1, Apple is rejecting all apps which access to the UDID.
But it seems the only thing that they can do is to check if the string "uniqueIdentifier" is in the binary or not.
So even if you don't acces anymore to the uniqueIdentifier of the phone, but you give to one variable the same name, they will find it in the binary and they will reject it cause they can't do the difference.
If you want to know if you binary contain it, you can change the extension of the .ipa (export for ad-hoc deployment) to .zip, unzip it, and do fgrep -R uniqueIdentifier . in the terminal at the payload/ folder.
You can also do this command in your project folder to find the files which contain the string.
This worked for me.

Provisioning a Limited Edition iOS app

I'm developing an app that will have two versions: one on the app store, and a limited edition that will be given away in a contest to one winner. My question is, how do I provision an app to give away to just one person? I'm guessing I need their UDID, and have to send them an Ad-Hoc distribution provisioning profile; but does this mean I will have to keep sending them new profiles every time it expires?
What would be the best way to do this?
Thanks,
chmod
Ad Hoc distribution certificates expire. Unless you want to give away a time-limited app (the duration of the Ad Hoc provision), the better option might be to gift the app to the winner's iTunes account, which will cost the developer 30%, or to use one of an App store app's 50 free redemption codes.
It depends on how you want to customize it.
If you have their UDID, you can check for it in code like this:
NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];
From there you could simply switch out graphics or functionality based on whether the device matches the UDID or not.
Note: uniqueIdentifier is depreciated as of iOS5. It still works and may still work well into the future, but there is no guarantee of that.