OpenGL ES iOS Device Compatibility

本文详细解析了iOS应用开发中至关重要的Info.plist文件,包括UIRequiredDeviceCapabilities键的使用方法,以及如何根据设备特性进行针对性配置。通过具体实例,展示了如何根据设备的硬件能力如摄像头、GPS等,合理设定应用的设备需求,确保应用在不同设备上的流畅运行。同时,文章还提供了详细的设备兼容性表格,帮助开发者全面了解不同设备的特性与限制,从而制定出更符合市场需求的应用策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Device Compatibility

The information property list (Info.plist) file contains critical information about your app’s configuration and must be included in your app bundle. Every new project you create in Xcode has a default Info.plist file configured with some basic information about your project. You can modify this file to specify additional configuration details for your app.

The UIRequiredDeviceCapabilities key lets you declare the hardware or specific capabilities that your app needs in order to run. All apps are required to have this key in their Info.plist file. The App Store uses the contents of this key to prevent users from downloading your app onto a device that cannot possibly run it. The tables in this chapter show all iOS devices and their capabilities.

Important: All device requirement changes must be made when you submit an update to your binary. You are permitted only to expand your device requirements. Submitting an update to your binary to restrict your device requirements is not permitted. You are unable to restrict device requirements because this action will keep customers who have previously downloaded your app from running new updates.

Important: If you require a capability listed in bold, you must build your app as a fat binary (armv6 and armv7) or require a minimum iOS version of 4.3 or later. See the individual device tables for a specific key requirement.

Declaring the Required Device Capabilities

The value of the UIRequiredDeviceCapabilities key is either an array or a dictionary that contains additional keys identifying features your app requires (or specifically prohibits). If you specify the value of the key using an array, the presence of a key indicates that the feature is required; the absence of a key indicates that the feature is not required and that the app can run without it. If you specify a dictionary instead, each key in the dictionary must have a Boolean value that indicates whether the feature is required or prohibited. A value of true indicates the feature is required and a value offalse indicates that the feature must not be present on the device. If a given capability is optional for your app, do not include the corresponding key in the dictionary.

Table 1-1 lists the keys that you can include in the array or dictionary for the UIRequiredDeviceCapabilities key. You should include keys only for the features that your app absolutely requires. If your app can run without a specific feature, do not include the corresponding key.

Table 1-1  Dictionary keys for the  UIRequiredDeviceCapabilities key

Key

Description

Minimum iOS Required

accelerometer

Include this key if your app requires (or specifically prohibits) the presence of accelerometers on the device. Apps use the Core Motion framework to receive accelerometer events. You do not need to include this key if your app detects only device orientation changes.

iOS 3.0

armv6

Include this key if your app is compiled only for the armv6 instruction set.

iOS 2.0

armv7

Include this key if your app is compiled only for the armv7 instruction set.

iOS 3.1

auto-focus-camera

Include this key if your app requires (or specifically prohibits) autofocus capabilities in the device’s still camera. Although most developers should not need to include this key, you might include it if your app supports macro photography or requires sharper images in order to perform some sort of image processing.

iOS 3.0

bluetooth-le

Include this key if your app requires (or specifically prohibits) the presence of Bluetooth low-energy hardware on the device.

iOS 5.0

camera-flash

Include this key if your app requires (or specifically prohibits) the presence of a camera flash for taking pictures or shooting video. Apps use the UIImagePickerController interface to control the enabling of this feature.

iOS 3.0

front-facing-camera

Include this key if your app requires (or specifically prohibits) the presence of a forward-facing camera. Apps use theUIImagePickerController interface to capture video from the device’s camera.

iOS 3.0

gamekit

Include this key if your app requires (or specifically prohibits) Game Center.

iOS 4.1

gps

Include this key if your app requires (or specifically prohibits) the presence of GPS (or AGPS) hardware when tracking locations. (You should include this key only if you need the higher accuracy offered by GPS hardware.) If you include this key, you should also include the location-services key. You should require GPS only if your app needs location data more accurate than the cellular or Wi-fi radios might otherwise provide.

iOS 3.0

gyroscope

Include this key if your app requires (or specifically prohibits) the presence of a gyroscope on the device. Apps use the Core Motion framework to retrieve information from gyroscope hardware.

iOS 3.0

healthkit

Include this key if your app requires (or specifically prohibits) HealthKit.

iOS 8.0

location-services

Include this key if your app requires (or specifically prohibits) the ability to retrieve the device’s current location using the Core Location framework. (This key refers to the general location services feature. If you specifically need GPS-level accuracy, you should also include the gps key.)

iOS 3.0

magnetometer

Include this key if your app requires (or specifically prohibits) the presence of magnetometer hardware. Apps use this hardware to receive heading-related events through the Core Location framework.

iOS 3.0

metal

Include this key if your app requires (or specifically prohibits) Metal.

iOS 8.0

microphone

Include this key if your app uses the built-in microphone or supports accessories that provide a microphone.

iOS 3.0

opengles-1

Include this key if your app requires (or specifically prohibits) the presence of the OpenGL ES 1.1 interfaces.

iOS 3.0

opengles-2

Include this key if your app requires (or specifically prohibits) the presence of the OpenGL ES 2.0 interfaces.

iOS 3.0

opengles-3

Include this key if your app requires (or specifically prohibits) the presence of the OpenGL ES 3.0 interfaces.

iOS 7.0

peer-peer

Include this key if your app requires (or specifically prohibits) peer-to-peer connectivity over a Bluetooth network.

iOS 3.1

sms

Include this key if your app requires (or specifically prohibits) the presence of the Messages app. You might require this feature if your app opens URLs with the sms scheme.

iOS 3.0

still-camera

Include this key if your app requires (or specifically prohibits) the presence of a camera on the device. Apps use theUIImagePickerController interface to capture images from the device’s still camera.

iOS 3.0

telephony

Include this key if your app requires (or specifically prohibits) the presence of the Phone app. You might require this feature if your app opens URLs with the tel scheme.

iOS 3.0

video-camera

Include this key if your app requires (or specifically prohibits) the presence of a camera with video capabilities on the device. Apps use the UIImagePickerController interface to capture video from the device’s camera.

iOS 3.0

wifi

Include this key if your app requires (or specifically prohibits) access to the networking features of the device.

iOS 3.0

For detailed information on how to create and edit property lists, see Information Property List Key Reference.

iPhone Devices

Table 1-2 and Table 1-3 list the capabilities for iPhone devices.

Table 1-2  iPhone 4, iPhone 5, and iPhone 6 device compatibility

Compatibility

iPhone 4

iPhone 4s

iPhone 5

iPhone 5c

iPhone 5s

iPhone 6

iPhone 6 Plus

accelerometer

X

X

X

X

X

X

X

armv6

X

X

X

X

X

X

X

armv7

X

X

X

X

X

X

X

auto-focus-camera

X

X

X

X

X

X

X

bluetooth-le

 

X

X

X

X

X

X

camera-flash

X

X

X

X

X

X

X

front-facing-camera

X

X

X

X

X

X

X

gamekit

X

X

X

X

X

X

X

gps

X

X

X

X

X

X

X

gyroscope

X

X

X

X

X

X

X

healthkit

X

X

X

X

X

X

location-services

X

X

X

X

X

X

X

magnetometer

X

X

X

X

X

X

X

metal

X

X

X

microphone

X

X

X

X

X

X

X

opengles-1

X

X

X

X

X

X

X

opengles-2

X

X

X

X

X

X

X

opengles-3

X

X

X

peer-peer

X

X

X

X

X

X

X

sms

X

X

X

X

X

X

X

still-camera

X

X

X

X

X

X

X

telephony

X

X

X

X

X

X

X

video-camera

X

X

X

X

X

X

X

wifi

X

X

X

X

X

X

X

Table 1-3  iPhone and iPhone 3G device compatibility

Compatibility

iPhone

iPhone 3G

iPhone 3GS

iPhone 3GS (China)

accelerometer

X

X

X

X

armv6

X

X

X

X

armv7

X

X

auto-focus-camera

 

 

X

X

bluetooth-le

 

 

 

 

camera-flash

 

 

 

 

front-facing-camera

 

 

 

 

gamekit

X

X

gps

 

X

X

X

gyroscope

 

 

 

 

healthkit

location-services

X

X

X

X

magnetometer

X

X

metal

microphone

X

X

X

X

opengles-1

X

X

X

X

opengles-2

X

X

opengles-3

peer-peer

X

X

X

sms

X

X

X

X

still-camera

X

X

X

X

telephony

X

X

X

X

video-camera

 

 

X

X

wifi

X

X

X

iPad Devices

Table 1-4 and Table 1-5, and Table 1-6 list the capabilities for iPad devices.

Table 1-4  iPad (4th generation), and iPad Air device compatibility

Compatibility

iPad

Wi-Fi

(4th gen)

iPad

Wi-Fi + Cellular

(4th gen)

iPad Air

Wi-Fi

iPad Air

Wi-Fi + Cellular

iPad Air 2

Wi-Fi

iPad Air 2

Wi-Fi + Cellular

accelerometer

X

X

X

X

X

X

armv6

X

X

X

X

X

X

armv7

X

X

X

X

X

X

auto-focus-camera

X

X

X

X

X

X

bluetooth-le

X

X

X

X

X

X

camera-flash

front-facing-camera

X

X

X

X

X

X

gamekit

X

X

X

X

X

X

gps

X

X

X

gyroscope

X

X

X

X

X

X

healthkit

location-services

X

X

X

X

X

X

magnetometer

X

X

X

X

X

X

metal

X

X

X

X

microphone

X

X

X

X

X

X

opengles-1

X

X

X

X

X

X

opengles-2

X

X

X

X

X

X

opengles-3

X

X

X

X

peer-peer

X

X

X

X

X

X

sms

still-camera

X

X

X

X

X

X

telephony

video-camera

X

X

X

X

X

X

wifi

X

X

X

X

X

X

Table 1-5  iPad mini device compatibility

Compatibility

iPad mini

Wi-Fi

iPad mini

Wi-Fi + Cellular

iPad mini 2

Wi-Fi

iPad mini 2

Wi-Fi + Cellular

iPad mini 3

Wi-Fi

iPad mini 3

Wi-Fi + Cellular

accelerometer

X

X

X

X

X

X

armv6

X

X

X

X

X

X

armv7

X

X

X

X

X

X

auto-focus-camera

X

X

X

X

X

X

bluetooth-le

X

X

X

X

X

X

camera-flash

 

 

front-facing-camera

X

X

X

X

X

X

gamekit

X

X

X

X

X

X

gps

 

X

X

X

gyroscope

X

X

X

X

X

X

healthkit

location-services

X

X

X

X

X

X

magnetometer

X

X

X

X

X

X

metal

X

X

X

X

microphone

X

X

X

X

X

X

opengles-1

X

X

X

X

X

X

opengles-2

X

X

X

X

X

X

opengles-3

X

X

X

X

peer-peer

X

X

X

X

X

X

sms

still-camera

X

X

X

X

X

X

telephony

video-camera

X

X

X

X

X

X

wifi

X

X

X

X

X

X

Table 1-6  iPad 1, iPad 2, and iPad (3rd generation) device compatibility

Compatibility

iPad

Wi-Fi

iPad

Wi-Fi + 3G

iPad 2

Wi-Fi

iPad 2

Wi-Fi + 3G

iPad

Wi-Fi

(3rd gen)

iPad

Wi-Fi + Cellular

(3rd gen)

accelerometer

X

X

X

X

X

X

armv6

X

X

X

X

X

X

armv7

X

X

X

X

X

X

auto-focus-camera

 

 

 

 

X

X

bluetooth-le

 

 

 

 

X

X

camera-flash

 

 

 

 

front-facing-camera

 

 

X

X

X

X

gamekit

X

X

X

X

X

X

gps

 

X

 

X

X

gyroscope

 

 

X

X

X

X

healthkit

location-services

X

X

X

X

X

X

magnetometer

X

X

X

X

X

X

metal

microphone

X

X

X

X

X

X

opengles-1

X

X

X

X

X

X

opengles-2

X

X

X

X

X

X

opengles-3

peer-peer

X

X

X

X

X

X

sms

still-camera

X

X

X

X

telephony

video-camera

 

 

X

X

X

X

wifi

X

X

X

X

X

X

iPod Touch Devices

Table 1-7 list the capabilities for iPod touch devices.

Table 1-7  iPod touch device compatibility

Compatibility

iPod touch

iPod touch

2nd gen

iPod touch

3rd gen

iPod touch

4th gen

iPod touch

5th gen

iPod touch

5th gen 16GB (no rear-facing camera)

accelerometer

X

X

X

X

X

X

armv6

X

X

X

X

X

X

armv7

X

X

X

X

auto-focus-camera

 

 

 

 

X

 

bluetooth-le

 

 

 

 

X

X

camera-flash

 

 

 

 

X

 

front-facing-camera

 

 

 

X

X

X

gamekit

X

X

X

X

X

gps

 

 

 

 

gyroscope

 

 

 

X

X

X

healthkit

X

X

location-services

X

X

X

X

X

X

magnetometer

metal

microphone

X

X

X

X

X

opengles-1

X

X

X

X

X

X

opengles-2

X

X

X

X

opengles-3

peer-peer

X

X

X

X

X

sms

still-camera

X

X

telephony

video-camera

 

 

 

X

X

wifi

X

X

X

X

X

X

### 关于 UniApp 框架推荐资源与教程 #### 1. **Uniapp 官方文档** 官方文档是最权威的学习资料之一,涵盖了从基础概念到高级特性的全方位讲解。对于初学者来说,这是了解 UniApp 架构技术细节的最佳起点[^3]。 #### 2. **《Uniapp 从入门到精通:案例分析与最佳实践》** 该文章提供了系统的知识体系,帮助开发者掌握 Uniapp 的基础知识、实际应用以及开发过程中的最佳实践方法。它不仅适合新手快速上手,也能够为有经验的开发者提供深入的技术指导[^1]。 #### 3. **ThorUI-uniapp 开源项目教程** 这是一个专注于 UI 组件库设计实现的教学材料,基于 ThorUI 提供了一系列实用的功能模块。通过学习此开源项目的具体实现方式,可以更好地理解如何高效构建美观且一致的应用界面[^2]。 #### 4. **跨平台开发利器:UniApp 全面解析与实践指南** 这篇文章按照章节形式详细阐述了 UniApp 的各个方面,包括但不限于其工作原理、技术栈介绍、开发环境配置等内容,并附带丰富的实例演示来辅助说明理论知识点。 以下是几个重要的主题摘选: - **核心特性解析**:解释了跨端运行机制、底层架构组成及其主要功能特点。 - **开发实践指南**:给出了具体的页面编写样例代码,展示了不同设备间 API 调用的方法论。 - **性能优化建议**:针对启动时间缩短、图形绘制效率提升等方面提出了可行策略。 ```javascript // 示例代码片段展示条件编译语法 export default { methods: { showPlatform() { console.log(process.env.UNI_PLATFORM); // 输出当前平台名称 #ifdef APP-PLUS console.log('Running on App'); #endif #ifdef H5 console.log('Running on Web'); #endif } } } ``` #### 5. **其他补充资源** 除了上述提到的内容外,还有许多在线课程视频可供选择,比如 Bilibili 上的一些免费系列讲座;另外 GitHub GitCode 平台上也有不少优质的社区贡献作品值得借鉴研究。 --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值