从 PhoneGap 应用程序的设备列表中删除 iPad

Remove iPad from device list in PhoneGap app

我刚刚在 PhoneGap 中构建了我的第二个应用程序,这个问题又出现了,只是这次它阻止了该应用程序被应用程序商店批准,所以我不能再忽略它了。

我用谷歌搜索了这个并尝试了很多东西,但我似乎无法删除该应用程序以使其不再供 iPads 使用。这是一个仅 iPhone 的应用程序,我什至没有 iPad 来测试它,所以我什至无法 'make it good' 为 ipad 让它通过 to应用商店。我在这个 post 的底部包含了我当前版本的 config.xml,你会看到我有标准的:

<preference name="target-device" value="handset" />

...以及我在网上找到的解决此问题的假定解决方法(这似乎很普遍,但现在显然也应该得到修复?!):

<gap:config-file platform="ios" parent="UIDeviceFamily" mode="replace">
    <string>1</string>
</gap:config-file>

...当我在 PhoneGap 构建中编译 ipa 并在我的 iTunes 中打开它时,它甚至说它仅适用于 iPhone 和 iPod touch:

...但是当我通过应用程序加载器上传它时,它在 iTunes Connect 中显示为可用于 iPads 以及在 TestFlight 中。奇怪的是,它不需要 iPad 友好的屏幕截图,这让我觉得我已经走到了尽头,但审核团队坚持认为我要 iPad 值得在他们允许它进入商店之前让它变得有点时间紧迫。

这是我的完整 config.xml(我 XXX 删除了敏感信息,因为它不是个人应用)

<widget xmlns     = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "XXX.XXXXXXX.XXXXXXXX"
        version   = "14">

    <gap:config-file platform="ios" parent="CFBundleShortVersionString">
        <string>1.0.0</string>
    </gap:config-file>

    <name>XXXXXXXX</name>

    <description>
        XXXXXXXXXX
    </description>

    <author href="http://XXXXXX.co.uk" email="XXXX@XXXXXXXXX.co.uk">
        XXXXXXXXXXX
    </author>

    <!-- Define the main entry-point to the application -->
    <content src="index.html" />

    <!-- Customize your app and platform with the preference element. -->
    <preference name="orientation" value="portrait" />       <!-- all: default means both landscape and portrait are enabled -->
    <preference name="target-device" value="handset" />        <!-- all: possible values handset, tablet, or universal -->
    <preference name="fullscreen" value="true" />           <!-- all: hides the status bar at the top of the screen -->
    <preference name="webviewbounce" value="true" />           <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
    <preference name="prerendered-icon" value="true" />           <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
    <preference name="stay-in-webview" value="false" />          <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
    <preference name="ios-statusbarstyle" value="default" />    <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
    <preference name="detect-data-types" value="false" />          <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
    <preference name="exit-on-suspend" value="true" />           <!-- ios: if set to true, app will terminate when home button is pressed -->
    <preference name="show-splash-screen-spinner" value="true" />          <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
    <preference name="auto-hide-splash-screen" value="true" />           <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
    <preference name="deployment-target" value="8.0" />
    <preference name="phonegap-version" value="cli-6.5.0" />

    <!-- Plugins -->
    <!-- Core plugins -->
    <plugin name="cordova-plugin-console"             source="npm" spec="~1.0.2" />
    <plugin name="cordova-plugin-device"              source="npm" spec="~1.1.1" />
    <plugin name="cordova-plugin-dialogs"             source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-inappbrowser"        source="npm" spec="~1.3.0" />
    <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />
    <plugin name="cordova-plugin-splashscreen"        source="npm" spec="~3.2.1" />
    <plugin name="cordova-plugin-statusbar"           source="npm" spec="~2.1.2" />
    <plugin name="cordova-plugin-vibration"           source="npm" spec="~2.1.0" />
    <plugin name="cordova-plugin-whitelist"           source="npm" spec="~1.2.1" />

    <gap:config-file platform="ios" parent="ITSAppUsesNonExemptEncryption" mode="add">
        <false/>
    </gap:config-file>

    <gap:config-file platform="ios" parent="UIDeviceFamily" mode="replace">
        <string>1</string>
    </gap:config-file>

    <!-- Define app icon and splashscreen for each platform. -->
    <icon src="icon.png" gap:platform="ios" width="57" height="57"/>

    <icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57"/>
    <icon src="res/icon/ios/icon-57@2x.png" gap:platform="ios" width="114" height="114"/>

    <icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
    <icon src="res/icon/ios/icon-72@2x.png" gap:platform="ios" width="144" height="144"/>

    <!-- iPhone / iPod Touch  -->
    <icon src="res/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
    <icon src="res/icon/ios/icon-60@2x.png" gap:platform="ios" width="120" height="120" />

    <!-- iPhone 6 / 6+ -->
    <icon src="res/icon/ios/icon-60@3x.png" gap:platform="ios" width="180" height="180" />

    <!-- Settings Icon -->
    <icon src="res/icon/ios/icon-small.png" platform="ios" width="29" height="29" />
    <icon src="res/icon/ios/icon-small@2x.png" platform="ios" width="58" height="58" />
    <icon src="res/icon/ios/icon-small@3x.png" platform="ios" width="87" height="87" />

    <!-- Spotlight Icon -->
    <icon src="res/icon/ios/icon-40.png" platform="ios" width="40" height="40" />
    <icon src="res/icon/ios/icon-40@2x.png" platform="ios" width="80" height="80" />
    <icon src="res/icon/ios/icon-40@3x.png" platform="ios" width="120" height="120" />

    <!-- iPhone and iPod touch -->
    <gap:splash src="res/screen/ios/Default.png" gap:platform="ios" width="320" height="480" />
    <gap:splash src="res/screen/ios/Default@2x.png" gap:platform="ios" width="640" height="960" />

    <!-- iPhone 5 / iPod Touch (5th Generation) -->
    <gap:splash src="res/screen/ios/Default-568h.png" gap:platform="ios" width="320" height="568" />
    <gap:splash src="res/screen/ios/Default-568h@2x.png" gap:platform="ios" width="640" height="1136" />

    <!-- iPhone 6 -->
    <gap:splash src="res/screen/ios/Default-667h@2x.png" gap:platform="ios" width="750" height="1334" />
    <gap:splash src="res/screen/ios/Default-Portrait-736h@3x.png" gap:platform="ios" width="1242" height="2208" />
    <gap:splash src="res/screen/ios/Default-Landscape-736h@3x.png" gap:platform="ios" width="2208" height="1242" />

    <access origin="*" />

    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />

</widget>

我也刚刚看到,即使在 iTunes Connect 中,当我点击构建时,它也将其列为 iPhone / iPod touch,没有 iPad...在 TestFlight 中并提交审查它似乎可用于 iPad?!我从这里去哪里?!

我刚刚找到了一种从 ipa 查看 plist 的方法,即使在其中,设备也被正确列为 1。我完全莫名其妙!我从这里去哪里?

您已经从设备列表中删除了 iPad,但无法避免在 iPad 台设备上安装。所有应用程序都可以安装在设备上,但如果应用程序未 iPad 就绪,它将显示为 iPhone 应用程序,您可以缩放以填满整个 iPad 屏幕

由于该应用程序将以 iPhone 4 尺寸显示,因此您不需要 iPad 来测试它是否看起来不错。反正你可以用模拟器测试一下