Обнаружение устройства — мой Mac (предназначено для iPad) [дубликат]IOS

Программируем под IOS
Гость
Обнаружение устройства — мой Mac (предназначено для iPad) [дубликат]

Сообщение Гость »


Is there any to check app is running on My Mac (Designed for iPad)?

These options don't work:

Код: Выделить всё

if ProcessInfo.processInfo.operatingSystemVersionString.contains("Mac OS X") {     print("Mac Designed for iPad ") } else {     // Running on an iPad or other iOS device     // Perform iPad-specific tasks or UI adjustments } if UIDevice.current.userInterfaceIdiom == .mac {     print("app is running on mac") } else {     print("iPad") } #if targetEnvironment(macCatalyst) {     print("mac Catalyst") } #endif 


Источник: https://stackoverflow.com/questions/781 ... d-for-ipad

Вернуться в «IOS»