I have just finished building my second app in PhoneGap and this problem has arisen again, except this time it's preventing the app being approved by the app store so I can't ignore it any further.
I have Googled and googled this and tried many things but I cannot seem to remove the app from being available to iPads. It is a iPhone only app and I don't even have an iPad to test it on so I can't even 'make it good' for ipad to get it through the to App store. I have included my current version of config.xml at the bottom of this post, you'll see I have the standard:
<preference name="target-device" value="handset" />
...and the supposed work around I have found for this problem online (which seems to be pretty widespread, but should also now be fixed apparently?!):
<gap:config-file platform="ios" parent="UIDeviceFamily" mode="replace">
<string>1</string>
</gap:config-file>
...and when I have compiled the ipa in PhoneGap build and open it in my itunes, it even says it's only available for iPhone and iPod touch:
...but when I upload it through Application loader it appears in iTunes Connect as available for iPads and as well in TestFlight. Strangely it does not require iPad friendly screenshots which makes me think I'm part way there, but the review team are insisting I make it iPad worthy before they allow it into the store and it's getting a little time critical.
Here's my full config.xml (I've XXX'd out the sensitive info as it's not a personal app)
<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>
I've also just seen that even in iTunes Connect, when I click on the build, it lists it as iPhone / iPod touch with no iPad... it's only when it's in TestFlight and submitted for review that it appears to be available for iPad?! Where do I go from here?!
And I've just found a way to view the plist from the ipa and even in there the devices are listed as 1 correctly. I am totally baffled! Where do I go from here?
You have already removed the iPad from the device list, but there is no way to avoid the installation on iPad devices. All apps can be installed on devices, but if the app is not iPad ready it will appear as a iPhone app that you can scale to fill the whole iPad screen
As the app will display on iPhone 4 size you don't need an iPad to test if it looks fine. Anyway, you can use the simulators to test