[英]How to ensure Cordova App can only be installed on a mobile phone and not on tablets?
I have a Cordova app I only want users on phones to be able to download. 我有一个Cordova应用程序,我只希望手机上的用户能够下载。 Is there a way to restrict the build so it won't show up in the store when the user is on an iPad or similar? 有没有一种方法可以限制构建,以便当用户使用iPad或类似设备时它不会在商店中显示?
Yes, include this setting in your config.xml 是的,将此设置包含在您的config.xml中
<preference name="target-device" value="handset" />
See the cordova documentation at https://cordova.apache.org/docs/en/latest/guide/platforms/ios/config.html119 请参阅https://cordova.apache.org/docs/en/latest/guide/platforms/ios/config.html119上的cordova文档
Full disclosure and attribution, I discovered this from an answer on the ionic forums here (suitable for all cordova builds not just ionic framework) 完全公开和注明出处,我是从此处的离子论论坛的答案中发现这一点的(适用于所有cordova构建而不仅仅是离子论框架)
You might also want to pickup iPhone on the Deployment Info section in xCode. 您可能还希望在xCode的“部署信息”部分中获取iPhone。 By default, it's set on Universal. 默认情况下,它设置为通用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.