<commit_before>//
//  UIImage+LaunchImage.swift
//  CardsAgainst
//
//  Created by <NAME> on 11/5/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import UIKit

extension UIImage {
    class func launchImage() -> UIImage {
        // We only care about iOS 8+ portrait iPhones
        // LaunchImage names found here: http://stackoverflow.com/a/25843887/373262
        var launchImageName: String
        switch UIScreen.mainScreen().bounds.size.height {
        case 0..<568:
            // 3.5 inch screen
            launchImageName = "LaunchImage-700"
        case 568:
            // 4 inch screen
            launchImageName = "LaunchImage-700-568h"
        case 667:
            // 4.7 inch screen
            launchImageName = "LaunchImage-800-667h"
        case 736:
            // 5.5 inch screen
            launchImageName = "LaunchImage-800-Portrait-736h"
        case 1024:
            // iPads, ev'ry last one of 'em
            launchImageName = "LaunchImage-700-Portrait@2x~ipad"
        default:
            // Let the system decide
            // @note: Won't ever work; see http://stackoverflow.com/questions/19107543/xcode-5-asset-catalog-how-to-reference-the-launchimage
            launchImageName = "LaunchImage"
        }
        return UIImage(named: launchImageName)!
    }
}<commit_msg>Hard fail for unknown screen size in UIImage+LaunchImage<commit_after>//
//  UIImage+LaunchImage.swift
//  CardsAgainst
//
//  Created by <NAME> on 11/5/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import UIKit

extension UIImage {
    class func launchImage() -> UIImage {
        // We only care about iOS 8+ portrait iPhones
        // LaunchImage names found here: http://stackoverflow.com/a/25843887/373262
        var launchImageName: String
        let screenHeight = UIScreen.mainScreen().bounds.size.height
        switch screenHeight {
        case 0..<568:
            // 3.5 inch screen
            launchImageName = "LaunchImage-700"
        case 568:
            // 4 inch screen
            launchImageName = "LaunchImage-700-568h"
        case 667:
            // 4.7 inch screen
            launchImageName = "LaunchImage-800-667h"
        case 736:
            // 5.5 inch screen
            launchImageName = "LaunchImage-800-Portrait-736h"
        case 1024:
            // iPads, ev'ry last one of 'em
            launchImageName = "LaunchImage-700-Portrait@2x~ipad"
        default:
            // @note: The general solution of `launchImageName = "LaunchImage"` won't ever work;
            //     see http://stackoverflow.com/questions/19107543/xcode-5-asset-catalog-how-to-reference-the-launchimage
            
            assertionFailure("Unable to find a LaunchImage for this device's screen size (height of \(screenHeight)pt).  UIImage+LaunchImage likely needs to be updated.")
        }
        return UIImage(named: launchImageName)!
    }
}
{'fraction_non_alphanumeric': 0.10332990044627531, 'fraction_numerical': 0.05629934775145898, 'mean_word_length': 1.9375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2552379', 'n_tokens_mistral': 961, 'n_tokens_neox': 836, 'n_words': 219}