UIDevice.current.name is not accessible anymore in iOS 16?

Hi, there

My app use UIDevice.current.name as a identification to save user's data. And in iOS public β & β 3 the value of UIDevice.current.name is not accessible anymore. It become to only iPhone or iPad not user-assigned device name in Setting->General->Name.

When I looked into header file of UIDeivce.h


@property(nonatomic,readonly,strong) NSString    *name;              // Synonym for model. Prior to iOS 16, user-assigned device name (e.g. @"My iPhone").

Will Apple not apply UIDevice.current.name anymore?

Best regards, Bunny

See this thread for more on this issue. Basically you’re seeing the new behavior for iOS 16 (protecting the privacy of the device name) and Apple has announced there is an entitlement to get around it, but they don’t seem to have announced yet how to actually get that entitlement.

Raise a request with apple support with the reason you want the device name. they will assign entitlement with bundle identifier. New profile can be used for device name in iOS 16.

There’s actually a form to fill out to request the entitlement. It’s linked from the documentation page for the entitlement.

UIDevice.current.name is not accessible anymore in iOS 16?
 
 
Q