在 Info.plist 中指定设备系列 [英] Specify device family in Info.plist

查看:45
本文介绍了在 Info.plist 中指定设备系列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以仅根据 Info.plist 中的键来指定设备系列,而无需更改构建设置?我已经阅读了 UIDeviceFamily 在构建时被自动添加到 Info.plist 的信息,并且文档说我不应该手动添加这个键.假设我不能使用 Xcode,但我可以编辑 Info.plist,有没有办法指定应用程序是否应该只在 iPhone(或 iPad)上运行?

Is there a way to specify the device family solely based on a key in Info.plist, without changing the build settings? I have read about UIDeviceFamily being added automatically to Info.plist at build time, and the documentation says that I should not add this key manually. Let's say I cannot use Xcode, but I can edit Info.plist, is there a way to specify if the app should be running only on iPhone (or iPad)?

谢谢,

推荐答案

查看 UIDeviceFamily 中的文档

check out the docs in UIDeviceFamily

UIDeviceFamily

如果只需要支持 ipad,请将 DeviceFamily 设置为 2.对于 iphone 设置为 1.对于 Universe 包括 1 和 2

if you need to only support ipad, set the DeviceFamily to 2. For iphone set to 1. For universe include both 1 and 2

这篇关于在 Info.plist 中指定设备系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆