I have built an app that I would like to put in the app store. The app is intended to run only on iPhone, not on iPad or iPod touch. However, I have heard about other iPhone only apps being rejected by Apple because they don't run correctly on iPad. I have searched the internet for a solution to this, and found that if you set UIRequiredDeviceCapabilities to include telephony, the app is not available on iPad. However, I would like to find a more legitimate way of telling Apple that my app is iPhone only. I am using react native with expo. Any help would be much appreciated.
Asked
Active
Viewed 240 times
2
-
1Set your app to iPhone only and deal with the fact that your app will run on an iPad in an iPhone sized window. You shouldn't have to do anything else. – Paulw11 Jul 10 '22 at 10:59
-
And how do I set my app to iPhone only? – jptr21824 Jul 10 '22 at 11:03
-
1In the Xcode project set it to iPhone – Paulw11 Jul 10 '22 at 11:22
-
As I said, I am not using Xcode. Instead I am using react native and expo. – jptr21824 Jul 10 '22 at 11:41
-
1wow, you really WANT to have it complicated. – vikingosegundo Jul 10 '22 at 12:06
-
1There is always an a plist file for your project, which is what the Xcode setting changes. Native apps are always built with Apple's toolchain at the end of the day. [this](https://github.com/expo/expo/issues/1206) seems to explain what you need to do. – Paulw11 Jul 10 '22 at 12:48
-
Thanks, that seemed to help – jptr21824 Jul 10 '22 at 13:13
1 Answers
0
From the Xcode perspective, you should be changing the targets in your project from:
TARGETED_DEVICE_FAMILY = "1,2"
To
TARGETED_DEVICE_FAMILY = "1"
(1 is iPhone, 2 is iPad). By default, Apple templates would create app for both, aka "universal app".
It looks like this is setup in Expo via
Adding the supportsTablet: false key under ios causes us to build deviceFamily as iPhone-only
https://github.com/expo/expo/issues/1206#issuecomment-355423637
I do think the post points to the long line, I suggest looking at ->
https://github.com/expo/xdl/blob/master/src/detach/IosNSBundle.js#L359

benc
- 1,381
- 5
- 31
- 39