简体   繁体   中英

Possible values for [[UIDevice currentDevice] systemName];

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

It's the operating system's name as the docs say. iOS was initially called "iPhone OS" (before iPad) but I think they didn't changed the systemName for compatibility reasons.

In the future, they could implement [UIDevice systemName] on (Mac) OS X and on that platform it would probably return Mac OS X or OS X .

The current use for this method is quite limited but you never know what ((partly) compatible) operating systems Apple or someone else may produce in the future...

for iPhone, the value for Operating System returned by Apple has been “iPhone OS”. In certain versions of iOS 9 and for apps published post-Xcode 8 running iOS 10, Apple has replaced the value for “iPhone OS” with “iOS.

在 ios 版本 15 更新后,ipad os 已将“iOS”的值替换为“iPadOS”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM