UIDevice model vs localizedModel

I want to use the name of the iOS device model in the user interface.

Since my application is localized, I suggest that I should use the localizedModel UIDevice property.

So far I have tried several languages ​​(Japanese, Russian, Simplified Chinese, Arabic), and localizedModel is always "iPhone".

I can not find any recommendations or descriptions about this property.

Does anyone know anything about this, for example, does his value deviate from what returns the property of the model? Why does he exist?

+4
source share
1 answer

From the docs:

The device model as a localized string. (Only for reading)

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html

From my testing, it returned iPhone Simulator as a model and localizedModel when the language was installed in Russian, and iPhone for iPhone 4. I'm not sure if the model is the right method to use at all, as it reports, and iPhone 4 is just an iPhone but if that’s all you need, that’s good.

I really do not think that the names will, in particular, be localized, since the iPhone is a trademark, it will not return its Cyrillic characters.

I would say just using localizedModel, it can magically localize at some point, and it will not return an empty string.

+3
source

All Articles