iOS: let qmake generate default LaunchScreen.xib

iOS8 will check if the app has a LaunchScreen.xib to determine
if it supports iPhone6/6+ (scale factor and resolution). So
we follow the same pattern as we do with the launch image for
iPhone5, and generate a default LaunchScreen.xib.

The xib file in this patch is a copy of a default file
generated by a native Xcode project (with quotes escaped), but
with the text label set to be $$TARGET.

Change-Id: I163ab48b6f4edea4cc1f6840a1f3d8b3cc0326db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2014-11-03 11:23:05 +01:00 committed by Jani Heikkinen
parent 0c2f7388a8
commit d4fcf2ca40
3 changed files with 55 additions and 0 deletions

View File

@ -24,6 +24,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>

View File

@ -0,0 +1,45 @@
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>
<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"6250\" systemVersion=\"14A343f\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">
<dependencies>
<plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"6244\"/>
<capability name=\"Constraints with non-1.0 multipliers\" minToolsVersion=\"5.1\"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File\'s Owner\"/>
<placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>
<view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">
<rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>
<autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>
<subviews>
<label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" misplaced=\"YES\" text=\"\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8ie-xW-0ye\">
<rect key=\"frame\" x=\"20\" y=\"439\" width=\"441\" height=\"21\"/>
<fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>
<color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
<nil key=\"highlightedColor\"/>
<variation key=\"widthClass=compact\">
<fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"11\"/>
</variation>
</label>
<label opaque=\"NO\" clipsSubviews=\"YES\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"$$TARGET\"
textAlignment=\"center\" lineBreakMode=\"middleTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"18\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kId-c2-rCX\">
<rect key=\"frame\" x=\"20\" y=\"140\" width=\"441\" height=\"43\"/>
<fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"36\"/>
<color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>
<nil key=\"highlightedColor\"/>
</label>
</subviews>
<color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>
<constraints>
<constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"bottom\" multiplier=\"1/3\" constant=\"1\" id=\"Kid-kn-2rF\"/>
<constraint firstAttribute=\"centerX\" secondItem=\"kId-c2-rCX\" secondAttribute=\"centerX\" id=\"Koa-jz-hwk\"/>
<constraint firstAttribute=\"bottom\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"bottom\" constant=\"20\" id=\"Kzo-t9-V3l\"/>
<constraint firstItem=\"8ie-xW-0ye\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"MfP-vx-nX0\"/>
<constraint firstAttribute=\"centerX\" secondItem=\"8ie-xW-0ye\" secondAttribute=\"centerX\" id=\"ZEH-qu-HZ9\"/>
<constraint firstItem=\"kId-c2-rCX\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"20\" symbolic=\"YES\" id=\"fvb-Df-36g\"/>
</constraints>
<nil key=\"simulatedStatusBarMetrics\"/>
<freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>
<point key=\"canvasLocation\" x=\"404\" y=\"445\"/>
</view>
</objects>
</document>

View File

@ -184,6 +184,14 @@ macx-xcode {
QMAKE_SUBSTITUTES += copy_image
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
}
macx-xcode {