diff --git a/Images.xcassets/devices/d_iphone4.imageset/Contents.json b/Images.xcassets/devices/d_iphone4.imageset/Contents.json index d570e94..e06bef4 100644 --- a/Images.xcassets/devices/d_iphone4.imageset/Contents.json +++ b/Images.xcassets/devices/d_iphone4.imageset/Contents.json @@ -4,6 +4,11 @@ "idiom" : "iphone", "scale" : "1x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "1x" + }, { "idiom" : "iphone", "filename" : "green@2x-1.png", @@ -18,6 +23,11 @@ { "idiom" : "iphone", "scale" : "3x" + }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "3x" } ], "info" : { diff --git a/Images.xcassets/devices/d_tv.imageset/Contents.json b/Images.xcassets/devices/d_tv.imageset/Contents.json index 20c23f4..f8b6156 100644 --- a/Images.xcassets/devices/d_tv.imageset/Contents.json +++ b/Images.xcassets/devices/d_tv.imageset/Contents.json @@ -4,6 +4,10 @@ "idiom" : "tv", "filename" : "cyan.png", "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" } ], "info" : { diff --git a/Images.xcassets/devices/d_watch.imageset/Contents.json b/Images.xcassets/devices/d_watch.imageset/Contents.json index 80456e0..000831c 100644 --- a/Images.xcassets/devices/d_watch.imageset/Contents.json +++ b/Images.xcassets/devices/d_watch.imageset/Contents.json @@ -11,11 +11,21 @@ "screen-width" : "<=145", "scale" : "2x" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "filename" : "cyan@3x.png", "screen-width" : ">145", "scale" : "2x" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/Images.xcassets/devices/mix/d_iphone_ipad_mac.imageset/Contents.json b/Images.xcassets/devices/mix/d_iphone_ipad_mac.imageset/Contents.json index 5328d64..a01a05b 100644 --- a/Images.xcassets/devices/mix/d_iphone_ipad_mac.imageset/Contents.json +++ b/Images.xcassets/devices/mix/d_iphone_ipad_mac.imageset/Contents.json @@ -5,6 +5,11 @@ "filename" : "green.png", "scale" : "1x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "1x" + }, { "idiom" : "iphone", "filename" : "green@2x.png", @@ -21,6 +26,11 @@ "filename" : "green@3x.png", "scale" : "3x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "3x" + }, { "idiom" : "ipad", "filename" : "blue.png", diff --git a/Images.xcassets/devices/mix/d_iphone_ipad_mac_watch.imageset/Contents.json b/Images.xcassets/devices/mix/d_iphone_ipad_mac_watch.imageset/Contents.json index 85ee281..1503cb9 100644 --- a/Images.xcassets/devices/mix/d_iphone_ipad_mac_watch.imageset/Contents.json +++ b/Images.xcassets/devices/mix/d_iphone_ipad_mac_watch.imageset/Contents.json @@ -5,6 +5,11 @@ "filename" : "green.png", "scale" : "1x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "1x" + }, { "idiom" : "iphone", "filename" : "green@2x.png", @@ -21,6 +26,11 @@ "filename" : "green@3x.png", "scale" : "3x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "3x" + }, { "idiom" : "ipad", "filename" : "blue.png", @@ -42,12 +52,22 @@ "screen-width" : "<=145", "scale" : "2x" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "filename" : "cyan@3x.png", "screen-width" : ">145", "scale" : "2x" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + }, { "idiom" : "mac", "filename" : "image.png", diff --git a/Images.xcassets/pdf/v_device.imageset/Contents.json b/Images.xcassets/pdf/v_device.imageset/Contents.json index d5b65b8..f295145 100644 --- a/Images.xcassets/pdf/v_device.imageset/Contents.json +++ b/Images.xcassets/pdf/v_device.imageset/Contents.json @@ -26,11 +26,19 @@ "filename" : "facebook-4.pdf", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "screen-width" : ">161" + }, { "idiom" : "watch", "filename" : "facebook-5.pdf", "screen-width" : ">145" }, + { + "idiom" : "watch", + "screen-width" : ">183" + }, { "idiom" : "tv", "filename" : "facebook-6.pdf" diff --git a/Images.xcassets/pdf/v_overrides.imageset/Contents.json b/Images.xcassets/pdf/v_overrides.imageset/Contents.json index 76112d2..70ade8f 100644 --- a/Images.xcassets/pdf/v_overrides.imageset/Contents.json +++ b/Images.xcassets/pdf/v_overrides.imageset/Contents.json @@ -33,6 +33,11 @@ "filename" : "green.png", "scale" : "1x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "1x" + }, { "idiom" : "iphone", "filename" : "green@2x.png", @@ -49,6 +54,11 @@ "filename" : "green@3x.png", "scale" : "3x" }, + { + "idiom" : "iphone", + "subtype" : "retina4", + "scale" : "3x" + }, { "idiom" : "ipad", "filename" : "facebook-1-1.pdf" @@ -72,11 +82,19 @@ "filename" : "facebook-4.pdf", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "screen-width" : ">161" + }, { "idiom" : "watch", "filename" : "facebook-5.pdf", "screen-width" : ">145" }, + { + "idiom" : "watch", + "screen-width" : ">183" + }, { "idiom" : "watch", "filename" : "cyan.png", @@ -88,12 +106,22 @@ "screen-width" : "<=145", "scale" : "2x" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "filename" : "cyan@3x.png", "screen-width" : ">145", "scale" : "2x" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" + }, { "idiom" : "tv", "filename" : "facebook-6.pdf" @@ -103,6 +131,10 @@ "filename" : "image.png", "scale" : "1x" }, + { + "idiom" : "tv", + "scale" : "2x" + }, { "idiom" : "mac", "filename" : "facebook-1-1-1.pdf" diff --git a/MacTestApp/AppDelegate.swift b/MacTestApp/AppDelegate.swift deleted file mode 100644 index 2541270..0000000 --- a/MacTestApp/AppDelegate.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// AppDelegate.swift -// MacTestApp -// -// Created by Bartosz Janda on 22.12.2014. -// Copyright (c) 2014 Bartosz Janda. All rights reserved. -// - -import Cocoa - -@NSApplicationMain -class AppDelegate: NSObject, NSApplicationDelegate { - - - - func applicationDidFinishLaunching(aNotification: NSNotification) { - // Insert code here to initialize your application - } - - func applicationWillTerminate(aNotification: NSNotification) { - // Insert code here to tear down your application - } - - -} - diff --git a/MacTestApp/Base.lproj/Main.storyboard b/MacTestApp/Base.lproj/Main.storyboard deleted file mode 100644 index be1b9df..0000000 --- a/MacTestApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,681 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - Default - - - - - - - Left to Right - - - - - - - Right to Left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MacTestApp/Info.plist b/MacTestApp/Info.plist deleted file mode 100644 index efafb15..0000000 --- a/MacTestApp/Info.plist +++ /dev/null @@ -1,34 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - Copyright © 2014 Bartosz Janda. All rights reserved. - NSMainStoryboardFile - Main - NSPrincipalClass - NSApplication - - diff --git a/MacTestApp/ViewController.swift b/MacTestApp/ViewController.swift deleted file mode 100644 index 549cb05..0000000 --- a/MacTestApp/ViewController.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// ViewController.swift -// MacTestApp -// -// Created by Bartosz Janda on 22.12.2014. -// Copyright (c) 2014 Bartosz Janda. All rights reserved. -// - -import Cocoa - -class ViewController: NSViewController { - - override func viewDidLoad() { - super.viewDidLoad() - - // Do any additional setup after loading the view. - } - - override var representedObject: AnyObject? { - didSet { - // Update the view, if already loaded. - } - } - - -} - diff --git a/TestApps/MacTestApp/ViewController.swift b/TestApps/MacTestApp/ViewController.swift index 93bb386..a293ddf 100644 --- a/TestApps/MacTestApp/ViewController.swift +++ b/TestApps/MacTestApp/ViewController.swift @@ -16,7 +16,7 @@ class ViewController: NSViewController { // Do any additional setup after loading the view. } - override var representedObject: AnyObject? { + override var representedObject: Any? { didSet { // Update the view, if already loaded. } diff --git a/TestApps/iOSTestApp/AppDelegate.swift b/TestApps/iOSTestApp/AppDelegate.swift index 53a7021..c31506b 100644 --- a/TestApps/iOSTestApp/AppDelegate.swift +++ b/TestApps/iOSTestApp/AppDelegate.swift @@ -13,30 +13,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/TestApps/tvTestApp/AppDelegate.swift b/TestApps/tvTestApp/AppDelegate.swift index 77068da..dd431ca 100644 --- a/TestApps/tvTestApp/AppDelegate.swift +++ b/TestApps/tvTestApp/AppDelegate.swift @@ -13,30 +13,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } } diff --git a/TestApps/watchTestApp Extension/InterfaceController.swift b/TestApps/watchTestApp Extension/InterfaceController.swift index 1485d25..264430b 100644 --- a/TestApps/watchTestApp Extension/InterfaceController.swift +++ b/TestApps/watchTestApp Extension/InterfaceController.swift @@ -11,9 +11,8 @@ import Foundation class InterfaceController: WKInterfaceController { - override func awakeWithContext(context: AnyObject?) { - super.awakeWithContext(context) - + override func awake(withContext context: Any?) { + super.awake(withContext: context) // Configure interface objects here. } diff --git a/acextract.xcodeproj/project.pbxproj b/acextract.xcodeproj/project.pbxproj index b523e28..6350f4f 100644 --- a/acextract.xcodeproj/project.pbxproj +++ b/acextract.xcodeproj/project.pbxproj @@ -297,18 +297,26 @@ path = "watchTestApp Extension"; sourceTree = ""; }; - 966A50291A3DEBE0002C814F = { + 9627F8F62275F8FB0090BCB7 /* TestApps */ = { isa = PBXGroup; children = ( - 9625C14A1A48C24A00EE5162 /* Images.xcassets */, - 9614270E1D1F1109005831AA /* Templates.xcassets */, - 966A50341A3DEBE0002C814F /* acextract */, - 96E9F6A81D0DD31F001588FF /* acextractTests */, 968FAAC01A48C1500083A943 /* iOSTestApp */, 968FAAE81A48C16E0083A943 /* macTestApp */, 96A84A561D0DF0D500B79D25 /* tvTestApp */, 961DEFDF1D0DDD2F002AD0CC /* watchTestApp */, 961DEFEE1D0DDD2F002AD0CC /* watchTestApp Extension */, + ); + path = TestApps; + sourceTree = ""; + }; + 966A50291A3DEBE0002C814F = { + isa = PBXGroup; + children = ( + 9625C14A1A48C24A00EE5162 /* Images.xcassets */, + 9614270E1D1F1109005831AA /* Templates.xcassets */, + 966A50341A3DEBE0002C814F /* acextract */, + 96E9F6A81D0DD31F001588FF /* acextractTests */, + 9627F8F62275F8FB0090BCB7 /* TestApps */, 960CEF851A3F7BEB00F0B156 /* Frameworks */, 966A50331A3DEBE0002C814F /* Products */, 960CEF861A3F7BF700F0B156 /* CommandLine.xcodeproj */, @@ -852,7 +860,7 @@ CLANG_ANALYZER_NONNULL = YES; DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "watchTestApp Extension/Info.plist"; + INFOPLIST_FILE = "TestApps/watchTestApp Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.iOSTestApp.watchkitapp.watchkitextension; PRODUCT_NAME = "${TARGET_NAME}"; @@ -870,7 +878,7 @@ CLANG_ANALYZER_NONNULL = YES; COPY_PHASE_STRIP = NO; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "watchTestApp Extension/Info.plist"; + INFOPLIST_FILE = "TestApps/watchTestApp Extension/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.iOSTestApp.watchkitapp.watchkitextension; PRODUCT_NAME = "${TARGET_NAME}"; @@ -892,7 +900,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; IBSC_MODULE = watchTestApp_Extension; - INFOPLIST_FILE = watchTestApp/Info.plist; + INFOPLIST_FILE = TestApps/watchTestApp/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.iOSTestApp.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; @@ -912,7 +920,7 @@ COPY_PHASE_STRIP = NO; GCC_NO_COMMON_BLOCKS = YES; IBSC_MODULE = watchTestApp_Extension; - INFOPLIST_FILE = watchTestApp/Info.plist; + INFOPLIST_FILE = TestApps/watchTestApp/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.iOSTestApp.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = watchos; @@ -1062,7 +1070,7 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = iOSTestApp/Info.plist; + INFOPLIST_FILE = TestApps/iOSTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.bjanda.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1077,7 +1085,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; - INFOPLIST_FILE = iOSTestApp/Info.plist; + INFOPLIST_FILE = TestApps/iOSTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.bjanda.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1097,7 +1105,7 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = macTestApp/Info.plist; + INFOPLIST_FILE = TestApps/macTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.bjanda.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1110,7 +1118,7 @@ buildSettings = { CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = macTestApp/Info.plist; + INFOPLIST_FILE = TestApps/macTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.bjanda.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1127,7 +1135,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = tvTestApp/Info.plist; + INFOPLIST_FILE = TestApps/tvTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.tvTestApp; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1146,7 +1154,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = tvTestApp/Info.plist; + INFOPLIST_FILE = TestApps/tvTestApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.bjanda.tvTestApp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/acextract/AssetsCatalog.swift b/acextract/AssetsCatalog.swift index 0af8c87..23514a4 100644 --- a/acextract/AssetsCatalog.swift +++ b/acextract/AssetsCatalog.swift @@ -26,8 +26,8 @@ import Foundation enum AssetsCatalogError: Error { - case FileDoesntExists - case CannotOpenAssetsCatalog + case fileDoesntExists + case cannotOpenAssetsCatalog } struct AssetsCatalog { @@ -45,24 +45,24 @@ struct AssetsCatalog { var swiftArray = [ImageSet]() for string in array { swiftArray.append(imageSet(withName: String(string))) - } + } return swiftArray } // MARK: Initialization init(path: String) throws { - let fp = (path as NSString).expandingTildeInPath - guard FileManager.default.fileExists(atPath: fp) else { - throw AssetsCatalogError.FileDoesntExists + let filePath = (path as NSString).expandingTildeInPath + guard FileManager.default.fileExists(atPath: filePath) else { + throw AssetsCatalogError.fileDoesntExists } - let url = NSURL(fileURLWithPath: fp) - self.filePath = fp + let url = NSURL(fileURLWithPath: filePath) + self.filePath = filePath do { self.catalog = try CUICatalog(url: url as URL) } catch { - throw AssetsCatalogError.CannotOpenAssetsCatalog + throw AssetsCatalogError.cannotOpenAssetsCatalog } } diff --git a/acextract/CoreUI_Swift.swift b/acextract/CoreUI_Swift.swift index 4ffadd9..169e12a 100644 --- a/acextract/CoreUI_Swift.swift +++ b/acextract/CoreUI_Swift.swift @@ -40,9 +40,8 @@ protocol IncorrectValueAssertion { extension IncorrectValueAssertion where Self: RawRepresentable & ValueCorrectness { func assertIncorrectValue() -> Bool { - let c = correct - assert(c, "Incorrect value: \(self) - \(rawValue)") - return c + assert(correct, "Incorrect value: \(self) - \(rawValue)") + return correct } } @@ -150,11 +149,11 @@ extension CUISubtype: NameStringConvertible { extension CUISubtype: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .normal: return rawValue == CUISubtype.normal.rawValue - case .iPhone4Inch: return rawValue == CUISubtype.iPhone4Inch.rawValue - case .appleWatch38: return rawValue == CUISubtype.appleWatch38.rawValue - case .appleWatch42: return rawValue == CUISubtype.appleWatch42.rawValue - default: return true + case .normal: return rawValue == CUISubtype.normal.rawValue + case .iPhone4Inch: return rawValue == CUISubtype.iPhone4Inch.rawValue + case .appleWatch38: return rawValue == CUISubtype.appleWatch38.rawValue + case .appleWatch42: return rawValue == CUISubtype.appleWatch42.rawValue + default: return true } } } @@ -162,15 +161,15 @@ extension CUISubtype: ValueCorrectness, IncorrectValueAssertion { extension CUISubtype: CustomStringConvertible { public var description: String { switch self { - case .normal: - return "normal" - case .appleWatch38: - return "-38" - case .appleWatch42: - return "-42" - case .iPhone4Inch: - return "-568h" - default: return "" + case .normal: + return "normal" + case .appleWatch38: + return "-38" + case .appleWatch42: + return "-42" + case .iPhone4Inch: + return "-568h" + default: return "" } } } @@ -179,10 +178,10 @@ extension CUISubtype: CustomStringConvertible { extension CUIUserInterfaceSizeClass: NameStringConvertible { var name: String { switch self { - case .any: return "*" - case .compact: return "-" - case .regular: return "+" - default: return "" + case .any: return "*" + case .compact: return "-" + case .regular: return "+" + default: return "" } } } @@ -190,10 +189,10 @@ extension CUIUserInterfaceSizeClass: NameStringConvertible { extension CUIUserInterfaceSizeClass: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .any: return rawValue == CUIUserInterfaceSizeClass.any.rawValue - case .compact: return rawValue == CUIUserInterfaceSizeClass.compact.rawValue - case .regular: return rawValue == CUIUserInterfaceSizeClass.regular.rawValue - default: return true + case .any: return rawValue == CUIUserInterfaceSizeClass.any.rawValue + case .compact: return rawValue == CUIUserInterfaceSizeClass.compact.rawValue + case .regular: return rawValue == CUIUserInterfaceSizeClass.regular.rawValue + default: return true } } } @@ -201,10 +200,10 @@ extension CUIUserInterfaceSizeClass: ValueCorrectness, IncorrectValueAssertion { extension CUIUserInterfaceSizeClass: CustomStringConvertible { public var description: String { switch self { - case .any: return "any" - case .compact: return "compact" - case .regular: return "regular" - default: return "" + case .any: return "any" + case .compact: return "compact" + case .regular: return "regular" + default: return "" } } } @@ -213,10 +212,10 @@ extension CUIUserInterfaceSizeClass: CustomStringConvertible { extension CUIRenderMode: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .original: return rawValue == CUIRenderMode.original.rawValue - case .template: return rawValue == CUIRenderMode.template.rawValue - case .default: return rawValue == CUIRenderMode.default.rawValue - default: return true + case .original: return rawValue == CUIRenderMode.original.rawValue + case .template: return rawValue == CUIRenderMode.template.rawValue + case .default: return rawValue == CUIRenderMode.default.rawValue + default: return true } } } @@ -224,10 +223,10 @@ extension CUIRenderMode: ValueCorrectness, IncorrectValueAssertion { extension CUIRenderMode: CustomStringConvertible { public var description: String { switch self { - case .original: return "original" - case .template: return "template" - case .default: return "default" - default: return "" + case .original: return "original" + case .template: return "template" + case .default: return "default" + default: return "" } } } @@ -236,9 +235,9 @@ extension CUIRenderMode: CustomStringConvertible { extension CUIResizingMode: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .tiles: return rawValue == CUIResizingMode.tiles.rawValue - case .stretches: return rawValue == CUIResizingMode.stretches.rawValue - default: return true + case .tiles: return rawValue == CUIResizingMode.tiles.rawValue + case .stretches: return rawValue == CUIResizingMode.stretches.rawValue + default: return true } } } @@ -246,9 +245,9 @@ extension CUIResizingMode: ValueCorrectness, IncorrectValueAssertion { extension CUIResizingMode: CustomStringConvertible { public var description: String { switch self { - case .tiles: return "tiles" - case .stretches: return "stretches" - default: return "" + case .tiles: return "tiles" + case .stretches: return "stretches" + default: return "" } } } @@ -257,11 +256,11 @@ extension CUIResizingMode: CustomStringConvertible { extension CUIImageType: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .none: return rawValue == CUIImageType.none.rawValue - case .horizontal: return rawValue == CUIImageType.horizontal.rawValue - case .vertical: return rawValue == CUIImageType.vertical.rawValue - case .horizontalAndVertical: return rawValue == CUIImageType.horizontalAndVertical.rawValue - default: return true + case .none: return rawValue == CUIImageType.none.rawValue + case .horizontal: return rawValue == CUIImageType.horizontal.rawValue + case .vertical: return rawValue == CUIImageType.vertical.rawValue + case .horizontalAndVertical: return rawValue == CUIImageType.horizontalAndVertical.rawValue + default: return true } } } @@ -269,11 +268,11 @@ extension CUIImageType: ValueCorrectness, IncorrectValueAssertion { extension CUIImageType: CustomStringConvertible { public var description: String { switch self { - case .none: return "none" - case .horizontal: return "horizontal" - case .vertical: return "vertical" - case .horizontalAndVertical: return "horizontal & vertical" - default: return "" + case .none: return "none" + case .horizontal: return "horizontal" + case .vertical: return "vertical" + case .horizontalAndVertical: return "horizontal & vertical" + default: return "" } } } @@ -282,11 +281,11 @@ extension CUIImageType: CustomStringConvertible { extension CUIGraphicalClass: NameStringConvertible { var name: String { switch self { - case .default: return "" - case .metal1v2: return "1v2" - case .metal2v2: return "2v2" - case .metal3v1: return "3v1" - default: return "" + case .default: return "" + case .metal1v2: return "1v2" + case .metal2v2: return "2v2" + case .metal3v1: return "3v1" + default: return "" } } } @@ -294,11 +293,11 @@ extension CUIGraphicalClass: NameStringConvertible { extension CUIGraphicalClass: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .default: return rawValue == CUIGraphicalClass.default.rawValue - case .metal1v2: return rawValue == CUIGraphicalClass.metal1v2.rawValue - case .metal2v2: return rawValue == CUIGraphicalClass.metal2v2.rawValue - case .metal3v1: return rawValue == CUIGraphicalClass.metal3v1.rawValue - default: return true + case .default: return rawValue == CUIGraphicalClass.default.rawValue + case .metal1v2: return rawValue == CUIGraphicalClass.metal1v2.rawValue + case .metal2v2: return rawValue == CUIGraphicalClass.metal2v2.rawValue + case .metal3v1: return rawValue == CUIGraphicalClass.metal3v1.rawValue + default: return true } } } @@ -306,11 +305,11 @@ extension CUIGraphicalClass: ValueCorrectness, IncorrectValueAssertion { extension CUIGraphicalClass: CustomStringConvertible { public var description: String { switch self { - case .default: return "default" - case .metal1v2: return "Metal 1v2" - case .metal2v2: return "Metal 2v2" - case .metal3v1: return "Metal 3v1" - default: return "" + case .default: return "default" + case .metal1v2: return "Metal 1v2" + case .metal2v2: return "Metal 2v2" + case .metal3v1: return "Metal 3v1" + default: return "" } } } @@ -319,11 +318,11 @@ extension CUIGraphicalClass: CustomStringConvertible { extension CUIMemoryClass: NameStringConvertible { var name: String { switch self { - case .default: return "" - case .memory1GB: return "1gb" - case .memory2GB: return "2gb" - case .memory4GB: return "4gb" - default: return "" + case .default: return "" + case .memory1GB: return "1gb" + case .memory2GB: return "2gb" + case .memory4GB: return "4gb" + default: return "" } } } @@ -331,11 +330,11 @@ extension CUIMemoryClass: NameStringConvertible { extension CUIMemoryClass: ValueCorrectness, IncorrectValueAssertion { var correct: Bool { switch self { - case .default: return rawValue == CUIMemoryClass.default.rawValue - case .memory1GB: return rawValue == CUIMemoryClass.memory1GB.rawValue - case .memory2GB: return rawValue == CUIMemoryClass.memory2GB.rawValue - case .memory4GB: return rawValue == CUIMemoryClass.memory4GB.rawValue - default: return true + case .default: return rawValue == CUIMemoryClass.default.rawValue + case .memory1GB: return rawValue == CUIMemoryClass.memory1GB.rawValue + case .memory2GB: return rawValue == CUIMemoryClass.memory2GB.rawValue + case .memory4GB: return rawValue == CUIMemoryClass.memory4GB.rawValue + default: return true } } } @@ -343,23 +342,23 @@ extension CUIMemoryClass: ValueCorrectness, IncorrectValueAssertion { extension CUIMemoryClass: CustomStringConvertible { public var description: String { switch self { - case .default: return "default" - case .memory1GB: return "1GB" - case .memory2GB: return "2GB" - case .memory4GB: return "4GB" - default: return "" + case .default: return "default" + case .memory1GB: return "1GB" + case .memory2GB: return "2GB" + case .memory4GB: return "4GB" + default: return "" } } } -//MARK: CUINamedImage +// MARK: CUINamedImage extension CUINamedImage { var acScale: ScaleFactor { return ScaleFactor(floatLiteral: scale) } var acSizeClassString: String { - switch (self.sizeClassHorizontal(), self.sizeClassVertical()) { + switch (self.sizeClassHorizontal(), self.sizeClassVertical()) { case (.any, .any): return "" case let (horizontal, vertical): return "\(horizontal.name)\(vertical.name)" } @@ -371,7 +370,7 @@ extension CUINamedImage { } return false } - + fileprivate var acFileExtension: String { if acIsPDF { return "pdf" @@ -379,7 +378,6 @@ extension CUINamedImage { return "png" } - var acImageName: String { // image size let width = self.size.width @@ -411,4 +409,3 @@ extension CUINamedImage { return "\(self.name)\(size)\(graphics)\(memory)\(sizeClassSuffix)\(subtype)\(scale)\(idiom).\(fileExtension)" } } - diff --git a/acextract/Operation.swift b/acextract/Operation.swift index e4c9f1f..9985b13 100644 --- a/acextract/Operation.swift +++ b/acextract/Operation.swift @@ -27,7 +27,7 @@ import Foundation // MARK: - Protocols protocol Operation { - func read(catalg: AssetsCatalog) throws -> Void + func read(catalg: AssetsCatalog) throws } struct CompoundOperation: Operation { @@ -48,10 +48,10 @@ let redColorSeq = "[31m" // MARK: - ExtractOperation enum ExtractOperationError: Error { - case OutputPathIsNotDirectory - case RenditionMissingData - case CannotSaveImage - case CannotCreatePDFDocument + case outputPathIsNotDirectory + case renditionMissingData + case cannotSaveImage + case cannotCreatePDFDocument } struct ExtractOperation: Operation { @@ -87,7 +87,7 @@ struct ExtractOperation: Operation { // Check if directory exists at given path and it is directory. var isDirectory: ObjCBool = false if FileManager.default.fileExists(atPath: outputPath, isDirectory: &isDirectory) && !(isDirectory.boolValue) { - throw ExtractOperationError.OutputPathIsNotDirectory + throw ExtractOperationError.outputPathIsNotDirectory } else { try FileManager.default.createDirectory(atPath: outputPath, withIntermediateDirectories: true, attributes: nil) } @@ -124,23 +124,23 @@ private extension CUINamedImage { } else if self._rendition().unslicedImage() != nil { try self.acSaveImage(filePath: filePath) } else { - throw ExtractOperationError.RenditionMissingData + throw ExtractOperationError.renditionMissingData } } func acSaveImage(filePath: String) throws { let filePathURL = NSURL(fileURLWithPath: filePath) guard let cgImage = self._rendition().unslicedImage()?.takeUnretainedValue() else { - throw ExtractOperationError.CannotSaveImage + throw ExtractOperationError.cannotSaveImage } guard let cgDestination = CGImageDestinationCreateWithURL(filePathURL, kUTTypePNG, 1, nil) else { - throw ExtractOperationError.CannotSaveImage + throw ExtractOperationError.cannotSaveImage } CGImageDestinationAddImage(cgDestination, cgImage, nil) if !CGImageDestinationFinalize(cgDestination) { - throw ExtractOperationError.CannotSaveImage + throw ExtractOperationError.cannotSaveImage } } @@ -149,11 +149,11 @@ private extension CUINamedImage { // http://stackoverflow.com/questions/3780745/saving-a-pdf-document-to-disk-using-quartz guard let cgPDFDocument = self._rendition().pdfDocument()?.takeUnretainedValue() else { - throw ExtractOperationError.CannotCreatePDFDocument + throw ExtractOperationError.cannotCreatePDFDocument } // Create the pdf context - let cgPage = CGPDFDocument.page(cgPDFDocument) - var cgPageRect = (cgPage as! CGPDFPage).getBoxRect(.mediaBox) + let cgPage = CGPDFDocument.page(cgPDFDocument) as! CGPDFPage // swiftlint:disable:this force_cast + var cgPageRect = cgPage.getBoxRect(.mediaBox) let mutableData = NSMutableData() let cgDataConsumer = CGDataConsumer(data: mutableData) @@ -164,14 +164,14 @@ private extension CUINamedImage { if cgPDFDocument.numberOfPages > 0 { cgPDFContext!.beginPDFPage(nil) - cgPDFContext!.drawPDFPage(cgPage as! CGPDFPage) + cgPDFContext!.drawPDFPage(cgPage) cgPDFContext!.endPDFPage() } else { - throw ExtractOperationError.CannotCreatePDFDocument + throw ExtractOperationError.cannotCreatePDFDocument } if !mutableData.write(toFile: filePath, atomically: true) { - throw ExtractOperationError.CannotCreatePDFDocument + throw ExtractOperationError.cannotCreatePDFDocument } } } diff --git a/acextract/PrintInformationOperation.swift b/acextract/PrintInformationOperation.swift index e5267f1..8f02816 100644 --- a/acextract/PrintInformationOperation.swift +++ b/acextract/PrintInformationOperation.swift @@ -74,12 +74,10 @@ extension CUIResizingMode: InformationPrintable { } extension CUIImageType: InformationPrintable { } extension CUIGraphicalClass: InformationPrintable { func printWithLabel(label: String) { - } } extension CUIMemoryClass: InformationPrintable { func printWithLabel(label: String) { - } } @@ -88,10 +86,10 @@ struct PrintInformationOperation: Operation { let verbose: Verbose enum Verbose { - case Name - case Verbose - case VeryVerbose - case VeryVeryVerbose + case name + case verbose + case veryVerbose + case veryVeryVerbose } func read(catalg: AssetsCatalog) { @@ -108,17 +106,17 @@ struct PrintInformationOperation: Operation { */ private func printImageSetData(imageSet: ImageSet) { switch verbose { - case .Name: + case .name: print("\(imageSet.name)") - case .Verbose: + case .verbose: print("\(escapeSeq+boldSeq)\(imageSet.name)\(escapeSeq+resetSeq): \(imageSetData(imageSet: imageSet))") _ = imageSetData(imageSet: imageSet) - case .VeryVerbose: + case .veryVerbose: print("\(escapeSeq+boldSeq)\(imageSet.name)\(escapeSeq+resetSeq):") for namedImage in imageSet.namedImages { printNamedImageShortData(namedImage: namedImage) } - case .VeryVeryVerbose: + case .veryVeryVerbose: print("Name: \(escapeSeq+boldSeq)\(imageSet.name)\(escapeSeq+resetSeq)") for namedImage in imageSet.namedImages { printNamedImageVerboseData(namedImage: namedImage) diff --git a/acextract/main.swift b/acextract/main.swift index 2cffae7..c3b18e8 100644 --- a/acextract/main.swift +++ b/acextract/main.swift @@ -60,13 +60,13 @@ else if let input = cliInput.value { if cliList.value { let verbose: PrintInformationOperation.Verbose switch cliVerbose.value { - case 0: verbose = .Name - case 1: verbose = .Verbose - case 2: verbose = .VeryVerbose - default: verbose = .VeryVeryVerbose + case 0: verbose = .name + case 1: verbose = .verbose + case 2: verbose = .veryVerbose + default: verbose = .veryVeryVerbose } - let pi = PrintInformationOperation(verbose: verbose) - try assetsCatalog.performOperation(operation: pi) + let pio = PrintInformationOperation(verbose: verbose) + try assetsCatalog.performOperation(operation: pio) } // Extract to folder. if let output = cliOutput.value { diff --git a/iOSTestApp/AppDelegate.swift b/iOSTestApp/AppDelegate.swift deleted file mode 100644 index e1475e1..0000000 --- a/iOSTestApp/AppDelegate.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// AppDelegate.swift -// iOSTestApp -// -// Created by Bartosz Janda on 22.12.2014. -// Copyright (c) 2014 Bartosz Janda. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - -} - diff --git a/iOSTestApp/Base.lproj/LaunchScreen.xib b/iOSTestApp/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 5f8ccdc..0000000 --- a/iOSTestApp/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOSTestApp/Base.lproj/Main.storyboard b/iOSTestApp/Base.lproj/Main.storyboard deleted file mode 100644 index 3a2a49b..0000000 --- a/iOSTestApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOSTestApp/Info.plist b/iOSTestApp/Info.plist deleted file mode 100644 index 40c6215..0000000 --- a/iOSTestApp/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/iOSTestApp/ViewController.swift b/iOSTestApp/ViewController.swift deleted file mode 100644 index 7f00add..0000000 --- a/iOSTestApp/ViewController.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// ViewController.swift -// iOSTestApp -// -// Created by Bartosz Janda on 22.12.2014. -// Copyright (c) 2014 Bartosz Janda. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} - diff --git a/tvTestApp/AppDelegate.swift b/tvTestApp/AppDelegate.swift deleted file mode 100644 index 0964b16..0000000 --- a/tvTestApp/AppDelegate.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// AppDelegate.swift -// tvTestApp -// -// Created by Bartosz Janda on 12.06.2016. -// Copyright © 2016 Bartosz Janda. All rights reserved. -// - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { - // Override point for customization after application launch. - return true - } - - func applicationWillResignActive(application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - -} - diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json deleted file mode 100644 index 8bf75d9..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json deleted file mode 100644 index 8bf75d9..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json deleted file mode 100644 index 6a3dcfa..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "assets" : [ - { - "size" : "1280x768", - "idiom" : "tv", - "filename" : "App Icon - Large.imagestack", - "role" : "primary-app-icon" - }, - { - "size" : "400x240", - "idiom" : "tv", - "filename" : "App Icon - Small.imagestack", - "role" : "primary-app-icon" - }, - { - "size" : "1920x720", - "idiom" : "tv", - "filename" : "Top Shelf Image.imageset", - "role" : "top-shelf-image" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json deleted file mode 100644 index 0564959..0000000 --- a/tvTestApp/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/Contents.json b/tvTestApp/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/tvTestApp/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Assets.xcassets/LaunchImage.launchimage/Contents.json b/tvTestApp/Assets.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 29d94c7..0000000 --- a/tvTestApp/Assets.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "orientation" : "landscape", - "idiom" : "tv", - "extent" : "full-screen", - "minimum-system-version" : "9.0", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/tvTestApp/Base.lproj/Main.storyboard b/tvTestApp/Base.lproj/Main.storyboard deleted file mode 100644 index 5eddf2f..0000000 --- a/tvTestApp/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tvTestApp/Info.plist b/tvTestApp/Info.plist deleted file mode 100644 index 4f33860..0000000 --- a/tvTestApp/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - arm64 - - - diff --git a/tvTestApp/ViewController.swift b/tvTestApp/ViewController.swift deleted file mode 100644 index 3f51d44..0000000 --- a/tvTestApp/ViewController.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// ViewController.swift -// tvTestApp -// -// Created by Bartosz Janda on 12.06.2016. -// Copyright © 2016 Bartosz Janda. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} - diff --git a/watchTestApp Extension/Assets.xcassets/README__ignoredByTemplate__ b/watchTestApp Extension/Assets.xcassets/README__ignoredByTemplate__ deleted file mode 100644 index b601d38..0000000 --- a/watchTestApp Extension/Assets.xcassets/README__ignoredByTemplate__ +++ /dev/null @@ -1 +0,0 @@ -Did you know that git does not support storing empty directories? diff --git a/watchTestApp Extension/ExtensionDelegate.swift b/watchTestApp Extension/ExtensionDelegate.swift deleted file mode 100644 index 9523ac8..0000000 --- a/watchTestApp Extension/ExtensionDelegate.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// ExtensionDelegate.swift -// watchTestApp Extension -// -// Created by Bartosz Janda on 12.06.2016. -// Copyright © 2016 Bartosz Janda. All rights reserved. -// - -import WatchKit - -class ExtensionDelegate: NSObject, WKExtensionDelegate { - - func applicationDidFinishLaunching() { - // Perform any final initialization of your application. - } - - func applicationDidBecomeActive() { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillResignActive() { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, etc. - } - -} diff --git a/watchTestApp Extension/Info.plist b/watchTestApp Extension/Info.plist deleted file mode 100644 index 46a3e96..0000000 --- a/watchTestApp Extension/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - watchTestApp Extension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - XPC! - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - NSExtension - - NSExtensionAttributes - - WKAppBundleIdentifier - com.bjanda.iOSTestApp.watchkitapp - - NSExtensionPointIdentifier - com.apple.watchkit - - WKExtensionDelegateClassName - $(PRODUCT_MODULE_NAME).ExtensionDelegate - - diff --git a/watchTestApp Extension/InterfaceController.swift b/watchTestApp Extension/InterfaceController.swift deleted file mode 100644 index 676c231..0000000 --- a/watchTestApp Extension/InterfaceController.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// InterfaceController.swift -// watchTestApp Extension -// -// Created by Bartosz Janda on 12.06.2016. -// Copyright © 2016 Bartosz Janda. All rights reserved. -// - -import WatchKit -import Foundation - - -class InterfaceController: WKInterfaceController { - - override func awakeWithContext(context: AnyObject?) { - super.awakeWithContext(context) - - // Configure interface objects here. - } - - override func willActivate() { - // This method is called when watch view controller is about to be visible to user - super.willActivate() - } - - override func didDeactivate() { - // This method is called when watch view controller is no longer visible - super.didDeactivate() - } - -} diff --git a/watchTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/watchTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index dd221ba..0000000 --- a/watchTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "images" : [ - { - "size" : "24x24", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "38mm" - }, - { - "size" : "27.5x27.5", - "idiom" : "watch", - "scale" : "2x", - "role" : "notificationCenter", - "subtype" : "42mm" - }, - { - "size" : "29x29", - "idiom" : "watch", - "role" : "companionSettings", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "watch", - "role" : "companionSettings", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "watch", - "scale" : "2x", - "role" : "appLauncher", - "subtype" : "38mm" - }, - { - "size" : "86x86", - "idiom" : "watch", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "38mm" - }, - { - "size" : "98x98", - "idiom" : "watch", - "scale" : "2x", - "role" : "quickLook", - "subtype" : "42mm" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/watchTestApp/Base.lproj/Interface.storyboard b/watchTestApp/Base.lproj/Interface.storyboard deleted file mode 100644 index a8e6acd..0000000 --- a/watchTestApp/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/watchTestApp/Info.plist b/watchTestApp/Info.plist deleted file mode 100644 index 34bd636..0000000 --- a/watchTestApp/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - iOSTestApp - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - WKCompanionAppBundleIdentifier - com.bjanda.iOSTestApp - WKWatchKitApp - - -