After the iOS16 upgrade, the IDFV changes?

After users upgraded iOS16 beta, some users' sandbox database cannot opening. After checking code logic, it is found that the encrypted key of the database has changed after upgraded iOS16. The code logic of the generated key is as follows:

  • (NSString *)mtdxSHA256DatabaseBinaryKeyFromnNSString:(NSString *)string

{   NSString *IDFV = [[[UIDevice currentDevice] identifierForVendor] UUIDString];   NSString *clearString = [IDFV stringByAppendingString:string];   const char *cstr = [clearString cStringUsingEncoding:NSUTF8StringEncoding];   NSData data = [NSData dataWithBytes:cstr length:clearString.length];   uint8_t digest[CC_SHA256_DIGEST_LENGTH];   CC_SHA256(data.bytes, (uint32_t)data.length, digest);   NSMutableString result = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH * 2];   for(int i = 0; i < CC_SHA256_DIGEST_LENGTH; i++) {     [result appendFormat:@"%02x", digest[i]];   }   NSString *key = [NSString stringWithFormat:@"x'%@'",[result uppercaseString]];   return [key copy]; }

This method contains identifierForVendor. I wonder if the IDFV has changed after the iOS16 upgrade? Could apple official help to confirm and reply?

Not an official APP Store package, but the bundle ID has not changed

Answered by Engineer in 720742022

Please file a Feedback Report as soon as possible, and include a sysdiagnose. It would be best if you can create the sysdiagnose as soon after installing iOS 16 beta as possible.

Please file a Feedback Report as soon as possible, and include a sysdiagnose. It would be best if you can create the sysdiagnose as soon after installing iOS 16 beta as possible.

While Gualtier Malde is correct that this shouldn’t have changed during the iOS 16 beta upgrade, I want to caution you about this:

After users upgraded iOS16 beta, some users' sandbox database cannot opening. After checking code logic, it is found that the encrypted key of the database has changed after upgraded iOS 16.

Do not store valuable user data such that identifierForVendor is the only way to recover that data. The exact handling of identifierForVendor has changed in the past and it’s possible that it might change in the future. If you use it as the only encryption key for your user’s data, you open yourself up to problems like this.

I’ve worked with other developers in the past who’ve had exactly this problem, and the end result was that all their users lost all their data )-: I’m hoping that this won’t happen here, but your current design makes you extremely vulnerable to such problems and I strongly recommend that you change your design.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, I have the exact same problem when the device update from iOS/iPadOS 15.6 to iOS 16 Betas, our application identifies via the following code and register the device with the client IDFV in backend. My app is also an Enterprise App for in-house distribution and not distribute in APP Store, it is confirmed that the bundle ID does not change and the application did not uninstall in between.

NSString *IDFV = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; 

We have just tested the latest Developer Beta 5 and Public Beta 3 still have the same problem updating from public release iOS/iPadOS 15.6. (i.e. iOS/iPadOS update from public release 15.6 to iOS/iPadOS 16 Beta 5, the IDFV changed unexpectedly)

However, iOS/iPadOS version updating among Beta Version will not change the IDFV (i.e. iOS/iPadOS update from 16 Beta 1 -> 2 -> 3 ->4->5, the IDFV remain unchanged).

Could anyone explain the behavior?

Thanks.

To reiterate what Gualtier Malde said at the top of this thread, if you’re seeing an unexpected change in identifierForVendor, you need to file a bug about that as soon as possible, making sure to include a sysdiagnose log taken as soon as possible after you ran the update and then noticed the change in your app.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks.

For your information, the feedback report number of the previous report was FB10905125 (in iOS16 Beta 4), and FB10764167 (in iOS16 Beta 3)

Hi, I have the exact same problem when the device updated from iOS/iPadOS 15.6 to iOS 16 Betas, our application identifies via the following code and registers the device with the client IDFV in the backend. My app is also an Enterprise App for in-house distribution and not distribute in APP Store, it is confirmed that the bundle ID does not change and the application did not uninstall in between.

NSString *IDFV = [[[UIDevice currentDevice] identifierForVendor] UUIDString];  We have just tested the latest Developer Beta 6 and Public Beta 3 still has the same problem updating from the public release iOS/iPadOS 15.6. (i.e. iOS/iPadOS update from public release 15.6 to iOS/iPadOS 16 Beta 5, the IDFV changed unexpectedly)

However, iOS/iPadOS version updating among Beta Version will not change the IDFV (i.e. iOS/iPadOS update from 16 Beta 1-> 6, the IDFV remain unchanged). Could anyone explain the behavior?

After the iOS16 upgrade, the IDFV changes?
 
 
Q