Possible values ​​for [[UIDevice currentDevice] systemName];

What are the possible values [[UIDevice currentDevice] systemName]; ? In Apple’s docs , this does not give any examples of what can happen, but all I can get from it is the iPhone OS , even on the simulator. Are there other possibilities, and if not, why does this property even exist?

+6
source share
2 answers

This is the name of the operating system, as the documents say. Initially, iOS was called "iPhone OS" (before the iPad), but I think they did not change systemName for compatibility reasons.

In the future, they may implement [UIDevice systemName] on (Mac) OS X, and on this platform it is likely to return Mac OS X or OS X

Current use of this method is rather limited, but you never know what ((partially) compatible) Apple or someone else's operating systems might produce in the future ...

+9
source

for the iPhone, the operating system returned by Apple was "iPhone OS." In some versions of iOS 9 and for applications published after Xcode 8 running iOS 10, Apple has replaced the iPhone OS value with iOS.

+1
source

Source: https://habr.com/ru/post/923282/


All Articles