From 8d2da358b7088837191a7fae8a19b711ecb47dfa Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 27 Nov 2014 12:58:42 +0100 Subject: [PATCH] macx-ios-clang: only provide default LaunchScreen.xib if using Xcode 6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If using an older version of Xcode, Xcode will sometimes complain that LaunchScreen.xib uses auto layout while the project at the same time has deployment target set to 5.0 (where auto layout is not supported). This is a bug in Xcode really, since LaunchScreen.xib will only be used when running on iOS 7 (otherwise a LaunchImage will be used). This has been fixed in Xcode 6. This patch adds a check for this early on. Change-Id: Ie612c25b413add23e15fc3cb4f9e30bb5292369d Reviewed-by: Tor Arne Vestbø --- .../macx-ios-clang/features/default_post.prf | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/mkspecs/macx-ios-clang/features/default_post.prf b/mkspecs/macx-ios-clang/features/default_post.prf index 643a17e23e..45ba777630 100644 --- a/mkspecs/macx-ios-clang/features/default_post.prf +++ b/mkspecs/macx-ios-clang/features/default_post.prf @@ -185,13 +185,17 @@ macx-xcode { launch_images.files = $$copy_image.output QMAKE_BUNDLE_DATA += launch_images - # Set up default LaunchScreen to support iPhone6/6+ - launch_screen = LaunchScreen.xib - copy_launch_screen.input = $$QMAKESPEC/$$launch_screen - copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen - QMAKE_SUBSTITUTES += copy_launch_screen - launch_screens.files = $$copy_launch_screen.output - QMAKE_BUNDLE_DATA += launch_screens + lessThan(QMAKE_XCODE_VERSION, "6.0") { + warning("You need to update Xcode to version 6 or newer to fully support iPhone6/6+") + } else { + # Set up default LaunchScreen to support iPhone6/6+ + launch_screen = LaunchScreen.xib + copy_launch_screen.input = $$QMAKESPEC/$$launch_screen + copy_launch_screen.output = $$OUT_PWD/$${TARGET}.xcodeproj/$$launch_screen + QMAKE_SUBSTITUTES += copy_launch_screen + launch_screens.files = $$copy_launch_screen.output + QMAKE_BUNDLE_DATA += launch_screens + } } macx-xcode {