问题
We found that your app does not comply with the Apple iOS Human Interface Guidelines, as required by the App Store Review Guidelines.
Specifically, we noticed your app only supported the top up variant of the portrait orientation, but not the bottom up variation.
While supporting both variants of both orientations, each with unique launch images, provides the best user experience and is recommended, we understand there are certain applications that must run in the portrait orientation only. In this case, it would be appropriate to support both variants of that orientation in your application, e.g., Home button up and down.
Addressing this issue typically requires only a simple and straightforward code modification. However, if you require assistance, the Apple Developer Support Team is available to provide code-level assistance.
For more information, please review the Aim to Support All Orientations section of the iOS Human Interface Guidelines.
Could anyone point me some code for troubleshooting that? The main app was all fine about that but now on the update my app was rejected for the second time for the same reason.
Here is my code for that
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);}
@end
But it's npt working
回答1:
since you said it's an universal app everything becomes clear.
On iPads you have to support all interface orientations, especially all 180 degree variants. So if you support portrait you have to support portrait upside down too. If you support landscape left you have to support landscape right too.
On iPhones there is no need to support portrait upside down. That's the default apple puts into their UIViewController templates.
- (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;
}
put that into every view controller in your app.
回答2:
Override shouldAutorotateToInterfaceOrientation:
in your view controller(s)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
回答3:
I'd suggest fixing "Specifically, we noticed your app only supported the top up variant of the portrait orientation, but not the bottom up variation." and testing it out of IOS5, or which ever iOS version you are putting the app out there. Thats pretty much the only issue.
Maybe post your orientation code and we can fix it for you.
Anyways questions like this are too localized for SO. Please read the FAQ for questions that are aimed for SO. Thanks
回答4:
I'm not sure how to write this below your post, but does your application rotate when you rotate the view upside down? I interpreted Apple's response as you currently do not support it.
Here is the documentation which talks about handling the view, https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html
Under the 'Handling View Rotations' you must support the enum types referenced here, https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/c/econst/UIInterfaceOrientationPortrait
I believe something like this comes in the one of the base examples, so this is more or less what they aiming for.
Best of luck, cheers.
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
回答5:
You should accept both portrait orientations:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
This code accepts both UIInterfaceOrientationPortrait
and UIInterfaceOrientationPortraitUpsideDown
.
Edit
Now that you mention that the app is universal, then yes, Apple HIG recommend that iPad apps support all orientations (4) or at least both landscape or both portrait orientations (2).
If you want the app to support all orientations on the iPad:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
return YES;
If you want the app to support only portrait orientations
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
来源:https://stackoverflow.com/questions/9625206/apple-app-rejection-reason