简体   繁体   English

如何确保Cordova App只能安装在手机上,而不能安装在平板电脑上?

[英]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.

相关问题 Flex行动应用程式仅适用于平板电脑 - Flex mobile app only for tablets 如何使用手机/ Cordova移动应用程序发送通知 - How to send notifications with a phone / Cordova mobile app Android应用程序应该只安装在手机而不是平板电脑上 - Android application which should get installed only on phone and not on tablets 开发仅适用于平板电脑的应用程序 - 如何? - Developing an app only for Tablets - how to? 如何确保我的应用程序无法安装在棉花糖上 - How can I ensure my app can not be installed on Marshmallow 如果从浏览器安装在手机上,如何导航移动应用程序 - How to Navigate Mobile app if installed on your Phone from Browser 限制应用程序仅安装在Android平板电脑和点燃设备上 - Restrict app to be installed on android tablets and kindle devices only 如何使我的应用仅适用于移动设备和7英寸平板电脑,而不能用于9和10英寸平板电脑? 请查看详细信息 - How can I make my app available only for mobiles devices & 7-inch tablets, but not for 9 & 10-inch tablets? Please see details 同一款Android应用程序可以用于手机,平板电脑和Google TV吗? - Can the same Android App be used for mobile phones, tablets and Google TV? 在手机而非平板电脑上只能在Play商店中看到我的应用 - Can only see my app in the play store on mobile phone not tablet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM