From ef4a6ce1a70c61be04db81026396338df6904f22 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 25 Mar 2015 17:29:46 +0000 Subject: [PATCH] Introjucer: Fix iOS 8.1 orientation by adding default orientation flags to the generated project plist. --- .../jucer_ProjectExport_XCode.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 9fd00508a2..bc4d8f4dcf 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -602,6 +602,25 @@ private: if (settings ["UIStatusBarHidden"]) addPlistDictionaryKeyBool (dict, "UIStatusBarHidden", true); + if (iOS) + { + static const char* kDefaultiOSOrientationStrings[] = + { + "UIInterfaceOrientationPortrait", + "UIInterfaceOrientationLandscapeLeft", + "UIInterfaceOrientationLandscapeRight", + nullptr + }; + + StringArray iOSOrientations (kDefaultiOSOrientationStrings); + + dict->createNewChildElement ("key")->addTextElement ("UISupportedInterfaceOrientations"); + XmlElement* plistStringArray = dict->createNewChildElement ("array"); + + for (int i = 0; i < iOSOrientations.size(); ++i) + plistStringArray->createNewChildElement ("string")->addTextElement (iOSOrientations[i]); + } + for (int i = 0; i < xcodeExtraPListEntries.size(); ++i) dict->addChildElement (new XmlElement (xcodeExtraPListEntries.getReference(i)));