在iOS 15上,UIDevice.current.name可以使用,但当我在iOS 16(beta3)上测试时,它总是返回'iPad'的名称。
请参阅相关的WWDC 2022视频文件:
- https://developer.apple.com/videos/play/wwdc2022/10096/
- https://developer.apple.com/videos/play/wwdc2022/10068/
我使用了:
- iPadOS (iOS 16 beta3)
- Xcode (版本14.0 beta 3 (14A5270f))