Apple App Rejection reason [closed] - objective-c

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
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

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.

Override shouldAutorotateToInterfaceOrientation: in your view controller(s)
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}

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

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);
}
*/

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);

Related

Best way to Supporting Multiple Interface Orientations - iOS8

I have been trying to convert few old apps written in objC long ago in iOS4 which support multiple ViewController with different orientation.
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
Above Method is called in app delegate from ViewController and Desire Orientation was set but seems stopped working with iOS8.
I have tried number of solution like creating Category of UINavigation controller etc, but nothing seems working with iOS8.
What is best approach to handle Multiple Orientation for both iPhone and iPad.
Furthermore, I am not using Storyboard with size classes, in plist i am only supporting portrait orientation.
Check all the orientation you want to support in device.
For that go to Project target-> Deployment info -> Device orientation-> Tick mark the desired orientation.
From iOS 6 onwards, you've to use.
- (BOOL)shouldAutorotate {
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation == UIInterfaceOrientationPortrait) {
// your code for portrait mode
}
return YES;
}
Refer to shouldAutorotateToInterfaceOrientation not being called in iOS 6

How to fix a viewcontroller's rotation?

My app uses landscape only. I fixed it via .plist's Supported interface orientations.
However, I need to use UIImagePickerController, and it only supports portrait mode. How can I rotate my app's rotation to portrait in a specific viewcontroller?
Any tips will be very helpful! Ty!
See the blog post iPhone programming: How to force your app to run in landscape mode.
ColinE, Do you mean that I should set as below?
All other viewControllers
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || UIInterfaceOrientationLandscapeLeft);
}
and set the portarit page
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Converting View from Landscape to Portrait?

I have already developed the app for Landscape mode,now the client is asking to build in both Landscape and Portrait mode.
How can i convert landscape View to portrait View?
Now i am using this code for Landscape View:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Please help me....
Advance Thanks :)
Simple, to support all orientations just return YES to shouldAutorotateToInterfaceOrientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
//Or to support all but portrait upside down
return interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown;
}
Learn how to use autoresizing masks. They are simple but pretty powerful in a majority of cases.
NSPostWhenIdle is right. You just have to return yes shouldAutorotateToInterfaceOrientation. That way you can have support for all orientations. Have a look at resizing properties through XIB. that will also make your work easy.

ipad rotation in iphone project

I've created a project that is targeted just for iPhone (for now) and I chose supported orientation only Portrait. On iPhone it works great, but when I launch my project on iPad my application is rotating! Actually I tried to make it a universal app and in iPad deployment info I chose supported orientation only Portrait, my app still rotated on iPad. How may I fix that?
To only support Portrait mode in your view, implement the following in each of your views:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Also, you need to make sure that have set the Supported Device Orientations for each device as well:
You can manually set the rotation values in the view controllers by implementing this function:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait;
}

Windows based iPad application orientation

I want to create iPad windows based application which support orientation by default windows application is not supporting orientation how to enable orientation support in windows based application in iPad.
Thank you
The window has no rotation functionality. It is allays in portrait mode. If you want something to rotate with the device, you should use UIViewController. It has to implement the method shouldAutorotateToInterfaceOrientation and return true for your orientations or remove it for all orientations.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
You should also change it in the project settings (ProjectName-Info.plist).