diff --git a/.swift-version b/.swift-version index bf77d54..819e07a 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.2 +5.0 diff --git a/Armchair.podspec b/Armchair.podspec index 45a4845..917735e 100644 --- a/Armchair.podspec +++ b/Armchair.podspec @@ -22,12 +22,12 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/UrbanApps/Armchair.git', :tag => s.version } s.license = { :type => "MIT", :file => "LICENSE" } - + s.source_files = "Source/*.{h,swift}" s.resources = "Localization/*.lproj" s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.requires_arc = true - s.swift_version = '4.2' + s.swift_version = '5.0' end diff --git a/Armchair.xcodeproj/project.pbxproj b/Armchair.xcodeproj/project.pbxproj index 865dd1c..2b95a52 100644 --- a/Armchair.xcodeproj/project.pbxproj +++ b/Armchair.xcodeproj/project.pbxproj @@ -326,11 +326,11 @@ ProvisioningStyle = Manual; }; E6D8B8EF19C756A4001AD043 = { - LastSwiftMigration = 0900; + LastSwiftMigration = 1100; }; F8111E3219A95C8B0040E7D1 = { CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 1100; }; }; }; @@ -546,7 +546,7 @@ SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -572,7 +572,7 @@ SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -750,7 +750,7 @@ SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -772,7 +772,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OBJC_BRIDGING_HEADER = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/AppDelegate.swift b/Example/AppDelegate.swift index c03e5a8..841564c 100644 --- a/Example/AppDelegate.swift +++ b/Example/AppDelegate.swift @@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { + func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { AppDelegate.setupArmchair() return true } diff --git a/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/Images.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/Mac Example.xcodeproj/project.pbxproj b/Mac Example.xcodeproj/project.pbxproj index f92f9ed..acd8401 100644 --- a/Mac Example.xcodeproj/project.pbxproj +++ b/Mac Example.xcodeproj/project.pbxproj @@ -166,6 +166,7 @@ TargetAttributes = { E60FA7B919C908FE00179D70 = { CreatedOnToolsVersion = 6.1; + LastSwiftMigration = 1100; }; }; }; @@ -392,6 +393,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -405,6 +407,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Source/Armchair.swift b/Source/Armchair.swift index e04aaa4..5ce117c 100644 --- a/Source/Armchair.swift +++ b/Source/Armchair.swift @@ -1723,11 +1723,11 @@ open class Manager : ArmchairManager { private static func getRootViewController() -> UIViewController? { if var window = UIApplication.shared.keyWindow { - if window.windowLevel != .normal { + if window.windowLevel != UIWindow.Level.normal { let windows: NSArray = UIApplication.shared.windows as NSArray for candidateWindow in windows { if let candidateWindow = candidateWindow as? UIWindow { - if candidateWindow.windowLevel == .normal { + if candidateWindow.windowLevel == UIWindow.Level.normal { window = candidateWindow break } diff --git a/iOS Example.xcodeproj/project.pbxproj b/iOS Example.xcodeproj/project.pbxproj index f6fdbe2..878132d 100644 --- a/iOS Example.xcodeproj/project.pbxproj +++ b/iOS Example.xcodeproj/project.pbxproj @@ -194,7 +194,7 @@ F8111E0419A951050040E7D1 = { CreatedOnToolsVersion = 6.0; DevelopmentTeam = 9H3S97RP4K; - LastSwiftMigration = 0830; + LastSwiftMigration = 1100; }; }; }; @@ -432,7 +432,6 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; @@ -443,7 +442,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "iOS Example"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -452,7 +451,6 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; INFOPLIST_FILE = "$(SRCROOT)/Example/Info-iOS.plist"; @@ -461,7 +459,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.armchair.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "iOS Example"; PROVISIONING_PROFILE = ""; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; };