An app I want to make only makes sense with a TrueDepth camera for ARKit and augmented reality face tracking capability. Can I require a user to have a True Depth camera(iPhone X only right now) to download my app from the App Store?
问题:
回答1:
No.
Apple's mechanism for segregating App Store listings by device capabilities does include a front-depth-camera
key. However, that key is not enabled for use by third-party apps, and Apple doesn't include it in the list of device capabilities that third-party apps can use to limit App Store availability of an app. If you include that key in your app's Info.plist, it has no effect on the App Store — your app will still be offered to devices without a TrueDepth camera.
Unless/until that changes, you can't really make an app that absolutely requires the TrueDepth camera. App Store guidelines require that baseline app functionality is the same across supported devices.
Instead, treat features based on the depth camera as secondary or supplementary to your app's core feature set — for example, if you have an app that adds visual effects to selfie-cam imagery, offer ARKit-based effects on devices that support face tracking and simpler effects on devices that don't. (Check ARFaceTrackingConfiguration.isSupported
to see if you're running on the right hardware.)
回答2:
Yes
Just add front-depth-camera
to the Required Capabilities section in your info.plist.
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Cameras/Cameras.html#//apple_ref/doc/uid/TP40013599-CH107-SW38