App Store: launching for iPhone/iPod only, not iPad

北城余情 提交于 2019-12-06 04:21:53

问题


How do I launch my app only for iPhone/iPod, not for iPad on the App Store? I can't seem to find any setting neither in my .plist file nor in iTunesConnect. Thanks!


回答1:


Just check Build Settings and find key: Targeted device family

There you have iPhone, iPad or iPhone/iPad options to choose

When you build the app and send it to Apple, it just checks values there and makes it available for the device specified.




回答2:


You can't. Apple's App store guidelines appear to specifically not allow iPhone apps that don't run or that crash under (1X/2X) compatibility mode on an iPad.




回答3:


It's an old question but the answer could be useful to other developers:

  • If you want your app to run on both iPhone and iPod I don't see the point to prevent it from running on an iPad under (1X/2X) compatibility mode. You may loose some consumers for nothing.
  • If you want your app to run on iPhone only because you need some capabilities like telephony. The good way would be to use UIRequiredDeviceCapabilities and to set "sms" and "telephony". See Apple doc for more details: https://developer.apple.com/library/ios/qa/qa1397/_index.html



回答4:


One way I could see this working is like this:

-(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
     if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad)
          return NO;

     // rest of launching code
     return YES;
}


来源:https://stackoverflow.com/questions/11056725/app-store-launching-for-iphone-ipod-only-not-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!