-2

To force change device orientation, I take code from here

but can apple reject app that use setOrientation: ? have some one experience?

or may be someone have 100% work and not can be rejected by Apple, solution?

if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) {
        if ([[UIDevice currentDevice] respondsToSelector:@selector(setOrientation:)]) {
            int orientationPortrait = UIInterfaceOrientationPortrait;
            NSMethodSignature *sig = [[UIDevice currentDevice] methodSignatureForSelector:@selector(setOrientation:)];
            NSInvocation* invo = [NSInvocation invocationWithMethodSignature:sig];
            [invo setTarget:[UIDevice currentDevice]];
            [invo setSelector:@selector(setOrientation:)];
            [invo setArgument:&orientationPortrait atIndex:2];
            [invo invoke];
        }
    }

Ok, thanks, I will try with this snippet.

Community
  • 1
  • 1
Daniil Bystrov
  • 303
  • 2
  • 12

1 Answers1

1

NO, Apple will reject on the basis of force orientation. Some times it is requirement and only way to view in landscape/portrait. Apple will not REJECT .

Macrosoft-Dev
  • 2,195
  • 1
  • 12
  • 15
  • 1
    did you ever try it ? http://stackoverflow.com/a/7280833/986169. A bit old but I think it still relevant – giorashc Mar 20 '14 at 11:41
  • Yes My aap is on store which have many view in single mode. You can try meu messaging from app Store. If accept answer upvote as well – Macrosoft-Dev Mar 20 '14 at 11:43
  • 1
    You are aware that not every single bit is tested and Apple might skipped that one. What I'm saying that without a proven quote from Apple rules this is a big risk to take – giorashc Mar 20 '14 at 11:44
  • Rejection is on the basis of duplicate design or some thing like that or if you private code/lib of Apple. – Macrosoft-Dev Mar 20 '14 at 11:47
  • Rejection can happen on various reasons, and I insist the only reference is Apple. – Volker Mar 20 '14 at 11:47
  • http://flippa.com/blog/rejected-ios-app/ http://blog.sensortower.com/blog/2013/09/09/10-ways-to-avoid-apple-app-store-rejection/ – Macrosoft-Dev Mar 20 '14 at 11:50
  • In my situation, in uiwebview playin video, and when I make it full screen from portrait mode, my customer want to support all orientation in fullscreen mode, but when off fullscreen make all in portrait. – Daniil Bystrov Mar 20 '14 at 14:09
  • Apple will sometimes reject if you support landscape left, but not landscape right. Sometimes they don't, but I've seen it happen. That's an edge case though and hopefully you wouldn't code that way anyway! – DBD Mar 20 '14 at 14:23