Require ForceTouch iOS App

回眸只為那壹抹淺笑 提交于 2019-11-27 07:43:58

问题


Is there a way to write an app's "Required device capabilities" such that the app runs only iPhone 6s and above (due to a requirement of force touch)?


回答1:


You normally use the UIRequiredDeviceCapabilities key, which can require certain features to be present. However at this time it doesn't seem like 3D Touch has been added.

A large warning will have to suffice for now, while waiting for apple to add 3D touch as a thing you can require. Otherwise there might be some features only the new iPhones models have, such as the arm chip, you could require. I haven't looked into this though.

On apples page for documentation you can see available keys for the UIRequiredDeviceCapabilities, where 3D Touch doesn't seem to be present. open https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3




回答2:


No, at this time it is not possible.

It is likely that Apple will introduce a new value to use with the UIRequiredDeviceCapabilities key.

Until that time, the best you can do is require one of (arm64, metal or opengles-3), and one of something like telephony or sms (until iPads get 3D Touch). This will at least restrict your app to the iPhone 5S and up.

And put a notice in the app description that your device requires 3D Touch.

Keep an eye on this document for all the possible device capability values: https://developer.apple.com/library/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

Also, this is handy: http://28byteslater.com/ios-compatibility/?exclude=&require=22,7,19,26#chart



来源:https://stackoverflow.com/questions/32810278/require-forcetouch-ios-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!