From ecc2cecd26b0b2f609179311b715e6e42a8d2767 Mon Sep 17 00:00:00 2001 From: Dennis Weissmann Date: Sat, 20 Feb 2016 22:52:06 +0100 Subject: [PATCH] added support for CarPlay InterfaceIdiom compatible with Xcode 7.3+ --- .travis.yml | 2 +- DeviceKit.podspec | 2 +- README.md | 6 +++--- Source/Device.swift | 9 +++------ Source/Info.plist | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9a28984..7548057 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode7.2 +osx_image: xcode7.3 env: global: diff --git a/DeviceKit.podspec b/DeviceKit.podspec index 6708d42..f77af1c 100644 --- a/DeviceKit.podspec +++ b/DeviceKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DeviceKit' - s.version = '0.3.0' + s.version = '0.3.1' s.summary = 'DeviceKit is a ยต-framework that provides a value-type replacement of UIDevice.' s.description = <<-DESC diff --git a/README.md b/README.md index c837231..1d31b5a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ ## Requirements - iOS 8.0+ / tvOS 9.0+ -- Xcode 7.2+ +- Xcode 7.3+ ## Installation DeviceKit can be installed in various ways. @@ -30,13 +30,13 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! -pod 'DeviceKit', '~> 0.3.0' +pod 'DeviceKit', '~> 0.3.1' ``` ### Carthage ```ogdl -github "dennisweissmann/DeviceKit" ~> 0.3.0 +github "dennisweissmann/DeviceKit" ~> 0.3.1 ``` ### Manually diff --git a/Source/Device.swift b/Source/Device.swift index c0f527f..8f2de6e 100644 --- a/Source/Device.swift +++ b/Source/Device.swift @@ -339,6 +339,8 @@ public enum Device { case Pad /// The user interface should be designed for TV case TV + /// The user interface should be designed for Car + case CarPlay /// Used when an object has a trait collection, but it is not in an environment yet. For example, a view that is created, but not put into a view hierarchy. case Unspecified @@ -347,6 +349,7 @@ public enum Device { case .Pad: self = .Pad case .Phone: self = .Phone case .TV: self = .TV + case .CarPlay: self = .CarPlay case .Unspecified: self = .Unspecified } } @@ -378,12 +381,6 @@ public enum Device { return UIDevice.currentDevice().localizedModel } - /// The model of the device including the generation (if != 1). - @available(*, deprecated=0.2.0, obsoleted=0.3.0, message="Use `description` instead.") - public var detailedModel: String { - return description - } - } // MARK: - CustomStringConvertible diff --git a/Source/Info.plist b/Source/Info.plist index f42ccf5..7e82fe1 100644 --- a/Source/Info.plist +++ b/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.3.0 + 0.3.1 CFBundleSignature ???? CFBundleVersion