【问题标题】:Apple App Rejection reason [closed]苹果应用程序拒绝原因[关闭]
【发布时间】:2012-03-26 09:09:18
【问题描述】:

我们发现您的应用不符合 Apple iOS Human 界面指南,按照 App Store 审核指南的要求。

具体来说,我们注意到您的应用仅支持 纵向,但不是自下而上的变化。

虽然支持两种方向的两种变体,但每种变体都有独特的 启动图像,提供最佳用户体验并被推荐, 我们了解某些应用程序必须在 仅限纵向。在这种情况下,将适合 在您的应用程序中支持该方向的两种变体,例如, 主页按钮向上和向下。

解决这个问题通常只需要一个简单且 直接的代码修改。但是,如果您需要帮助, Apple 开发人员支持团队可提供代码级 帮助。

有关更多信息,请查看旨在支持所有人 iOS 人机界面指南的方向部分。

谁能给我一些代码来解决这个问题?主应用程序对此一切都很好,但现在在更新时,我的应用程序由于同样的原因第二次被拒绝。

这是我的代码

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);}

@end

但它的 npt 工作

【问题讨论】:

  • 那么,将 iPad/iPhone 保持在当前方向的 180 度是否有效?如果没有,那就修复它。
  • 什么? iPhone上的主页按钮是强制性的吗?从何时起?这很奇怪,尤其是因为苹果将 return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 放入了模板中的 shouldAutorotateToInterfaceOrientation 中。
  • 是的,我不想只支持这两个方向
  • 通用应用改变了一切。所以他们谈论 iPad 上的轮换。
  • 您使用 iPhone 标签标记了您的问题,因此我们假设它是仅适用于 iPhone 的应用程序。请更新您的问题。

标签: objective-c ios universal


【解决方案1】:

我建议修复“具体来说,我们注意到您的应用仅支持纵向的自上而下变体,但不支持自下而上变体。”并从 IOS5 或您将应用程序放在那里的任何 iOS 版本中对其进行测试。 这几乎是唯一的问题。

也许发布您的方向代码,我们可以为您修复它。

无论如何,这样的问题对于 SO 来说过于本地化了。有关针对 SO 的问题,请阅读FAQ。谢谢

【讨论】:

  • 我知道有一个用于 iOS 开发的 SO 姐妹网站,虽然我忘记了它是什么...
  • apple.stackexchange.com ?我认为它没有 iOS 开发网站
  • 这可能是app stores site 上的主题(目前不存在
  • @sch 我还没有测试过,但我认为这是标准的,如果你指定你只想要横向并使用我确实拥有的代码,它会自动翻转它。感谢指正
【解决方案2】:

你应该接受两个纵向:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}

此代码同时接受UIInterfaceOrientationPortraitUIInterfaceOrientationPortraitUpsideDown

编辑

既然您提到该应用程序是通用的,那么是的,Apple HIG 建议 iPad 应用程序支持所有方向 (4) 或至少支持横向或纵向 (2)。

如果您希望应用支持 iPad 上的所有方向:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

return YES;

如果您希望应用仅支持纵向方向

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

return UIInterfaceOrientationIsPortrait(interfaceOrientation);

【讨论】:

    【解决方案3】:

    在您的视图控制器中覆盖 shouldAutorotateToInterfaceOrientation:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
        return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
    }
    

    【讨论】:

      【解决方案4】:

      我不确定如何在您的帖子下方写下此内容,但是当您将视图倒置旋转时,您的应用程序会旋转吗?我将 Apple 的回复解释为您目前不支持它。

      这里是关于处理视图的文档,https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html

      在“处理视图旋转”下,您必须支持此处引用的枚举类型 https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/c/econst/UIInterfaceOrientationPortrait

      我相信这样的东西出现在基本示例之一中,所以这或多或少是他们的目标。

      祝你好运,干杯。

      /*
      // Override to allow orientations other than the default portrait orientation.
      - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      // Return YES for supported orientations
      return (interfaceOrientation == UIInterfaceOrientationPortrait);
      }
      */
      

      【讨论】:

      • 不,我的应用无法旋转,所以我无法理解的问题在哪里!
      【解决方案5】:

      既然你说它是一个通用应用程序,一切都变得清晰了。

      在 iPad 上,您必须支持所有界面方向,尤其是所有 180 度变体。所以如果你支持纵向,你也必须支持纵向倒置。如果您支持横向左侧,则您也必须支持横向右侧。

      在 iPhone 上,无需支持纵向倒置。这是默认的苹果放入他们的 UIViewController 模板。

      - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
      {
          if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
              // on iPad support all orientations
              return YES;
          } else {
              // on iPhone/iPod support all orientations except Portrait Upside Down
              return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
          }
          return NO;
      }
      

      将其放入应用中的每个视图控制器中。

      【讨论】:

      • 好的,该代码在模拟器中也可以工作吗?
      • 不,它在模拟器中不起作用,并且没有 ipad 来测试它
      • 将该代码放入所有视图控制器中。如果您使用的是 UITabBarController,仅将其放在一个中是不够的。在你的项目中搜索 shouldAutorotateToInterfaceOrientation 并检查你找到的每一个方法。如果其中一个只为肖像返回 YES,则您不能旋转到倒置的肖像
      • Matthias 你救了我的命,非常感谢你摇滚!!!
      • 仅在 iPhone 纵向上是可以的。有成千上万的应用程序可以做到这一点。
      猜你喜欢
      • 2010-09-23
      • 1970-01-01
      • 2021-08-18
      • 2023-03-25
      • 1970-01-01
      • 1970-01-01
      • 2014-11-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多