title: iOS Error: Supported orientations has no common orientation with the application (iPhone)
body: <p><strong>Using iOS 8.3</strong></p>
  
  <p>I have a view in landscape mode, and i'm trying to open a portrait only view controller. every time i try to open it, the app crashes.</p>
  
  <p>I have read this <a href="https://devforums.apple.com/message/731764#731764" rel="nofollow noreferrer">official apple answer</a> which basically recommends doing the following:</p>
  
  <p>in the app delegate:</p>
  
  <pre><code>@implementation AppDelegate
  
  -(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
  {
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
          return UIInterfaceOrientationMaskAll;
      else  /* iphone */
          return UIInterfaceOrientationMaskAllButUpsideDown;
  } 
  </code></pre>
  
  <p>and in my controller:</p>
  
  <pre><code>-(NSUInteger)supportedInterfaceOrientations
  {
      return UIInterfaceOrientationMaskLandscape;
  }
  </code></pre>
  
  <p>And so i have, and yet i still get this crash message:</p>
  
  <pre><code>Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and [PUUIAlbumListViewController shouldAutorotate] is returning YES
  </code></pre>
  
  <p>In the project general settings i have the following (which should not be changed according to apple's answer):</p>
  
  <p><a href="https://i.stack.imgur.com/DZKTC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DZKTC.png" alt="settings"></a></p>
  
  <p>I can see that these functions are in fact being called but nothing helps.
  Any thoughts?</p>
  
  <p>Some questions i read earlier:</p>
  
  <p><a href="https://stackoverflow.com/questions/12520030/how-to-force-a-uiviewcontroller-to-portait-orientation-in-ios-6">How to force a UIViewController to Portrait orientation in iOS 6</a></p>
  
  <p><a href="https://stackoverflow.com/questions/12447552/ios6-supportedinterfaceorientations-not-working-is-invoked-but-the-interface-s">iOS6: supportedInterfaceOrientations not working (is invoked but the interface still rotates)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/12540597/supported-orientations-has-no-common-orientation-with-the-application-and-shoul">Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES&#39;</a></p>