问题
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