How to get the Iphone type from simulator (IOS)

后端 未结 3 1905
渐次进展
渐次进展 2020-12-06 05:55

There are a lot of solutions to find out on which device out app is running.

iOS: How to determine the current iPhone/device model in Swift?

But running in t

3条回答
  •  醉梦人生
    2020-12-06 06:26

    As of Xcode 9.4.1, NSProcessInfo().environment now includes a key for "SIMULATOR_DEVICE_NAME". Values look like "iPhone 8".

提交回复
热议问题