从PhoneGap应用

时间:2017-09-20 09:21:12

标签: ios cordova phonegap-build phonegap

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

我已经谷歌搜索并搜索了这个并尝试了很多东西,但我似乎无法将该应用程序移除到iPad上。它是一个仅限iPhone的应用程序,我甚至没有iPad来测试它,因此我甚至无法让ipad“通过App Store实现它”。我在本文的底部包含了我当前版本的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:

enter image description here

...但是当我通过Application loader上传时,它会在iTunes Connect中显示为可用于iPad以及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中,当我点击构建时,它会将其列为没有iPad的iPhone / iPod touch ......只有当它在TestFlight中并提交审核时才会显示适用于iPad?!我从哪里开始?!

enter image description here

我刚刚找到了一种从ipa查看plist的方法,甚至在那里设备被正确地列为1。我完全不知所措!我从哪里开始?

1 个答案:

答案 0 :(得分:0)

您已从设备列表中删除了iPad,但无法避免在iPad设备上安装。所有应用程序都可以安装在设备上,但如果该应用程序不支持iPad,它将显示为可以扩展以填充整个iPad屏幕的iPhone应用程序

由于该应用程序将在iPhone 4尺寸上显示,因此您不需要iPad来测试它是否正常。无论如何,您可以使用模拟器进行测试