Skip to content
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

Commit cf57ae8

Browse files
committed
Support Swift 4.2
1 parent fedee68 commit cf57ae8

File tree

7 files changed

+61
-14
lines changed

7 files changed

+61
-14
lines changed

Carthage/Checkouts/Device/Device.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Device"
3-
s.version = "3.1.0"
3+
s.version = "3.1.2"
44
s.summary = "Light weight tool for detecting the current device and screen size written in swift."
55

66
s.description = "Swift library for detecting the running device's model and screen size. With the newer  devices, developers have more work to do. This library simplifies their job by allowing them to get information about the running device and easily target the ones they want."

Carthage/Checkouts/Device/Device.xcodeproj/project.pbxproj

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,9 @@
342342
};
343343
BE11EEE61BE3FC0300816835 = {
344344
CreatedOnToolsVersion = 7.1;
345-
DevelopmentTeam = B68QLRDMYT;
345+
DevelopmentTeam = 9CWMR8UHTJ;
346346
LastSwiftMigration = 0930;
347+
ProvisioningStyle = Automatic;
347348
};
348349
E2C023A91D6331010033AD25 = {
349350
CreatedOnToolsVersion = 7.3.1;
@@ -514,7 +515,7 @@
514515
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
515516
PRODUCT_NAME = "$(TARGET_NAME)";
516517
SKIP_INSTALL = YES;
517-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
518+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
518519
SWIFT_VERSION = 4.0;
519520
TARGETED_DEVICE_FAMILY = "1,2";
520521
VERSIONING_SYSTEM = "apple-generic";
@@ -536,7 +537,7 @@
536537
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
537538
PRODUCT_NAME = "$(TARGET_NAME)";
538539
SKIP_INSTALL = YES;
539-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
540+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
540541
SWIFT_VERSION = 4.0;
541542
TARGETED_DEVICE_FAMILY = "1,2";
542543
VERSIONING_SYSTEM = "apple-generic";
@@ -658,15 +659,17 @@
658659
CLANG_ENABLE_MODULES = YES;
659660
CODE_SIGN_IDENTITY = "iPhone Developer";
660661
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
661-
DEVELOPMENT_TEAM = B68QLRDMYT;
662+
CODE_SIGN_STYLE = Automatic;
663+
DEVELOPMENT_TEAM = 9CWMR8UHTJ;
662664
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
663665
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
664666
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
665667
PRODUCT_BUNDLE_IDENTIFIER = "$(inherited).Example";
666668
PRODUCT_NAME = "$(TARGET_NAME)";
667669
PROVISIONING_PROFILE = "";
670+
PROVISIONING_PROFILE_SPECIFIER = "";
668671
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
669-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
672+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
670673
SWIFT_VERSION = 4.0;
671674
TARGETED_DEVICE_FAMILY = "1,2";
672675
};
@@ -680,14 +683,16 @@
680683
CLANG_ENABLE_MODULES = YES;
681684
CODE_SIGN_IDENTITY = "iPhone Developer";
682685
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
683-
DEVELOPMENT_TEAM = B68QLRDMYT;
686+
CODE_SIGN_STYLE = Automatic;
687+
DEVELOPMENT_TEAM = 9CWMR8UHTJ;
684688
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
685689
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
686690
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
687691
PRODUCT_BUNDLE_IDENTIFIER = "$(inherited).Example";
688692
PRODUCT_NAME = "$(TARGET_NAME)";
689693
PROVISIONING_PROFILE = "";
690-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
694+
PROVISIONING_PROFILE_SPECIFIER = "";
695+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
691696
SWIFT_VERSION = 4.0;
692697
TARGETED_DEVICE_FAMILY = "1,2";
693698
};

Carthage/Checkouts/Device/Example/ViewController.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,20 @@ class ViewController: UIViewController {
2929
case .iPhoneSE: print("It's an iPhone SE")
3030
case .iPhone7: print("It's an iPhone 7")
3131
case .iPhone7Plus: print("It's an iPhone 7 Plus")
32+
case .iPhone8: print("It's an iPhone 8")
33+
case .iPhone8Plus: print("It's an iPhone 8 Plus")
34+
case .iPhoneX: print("It's an iPhone X")
35+
case .iPhoneXS: print("It's an iPhone Xs")
36+
case .iPhoneXS_Max: print("It's an iPhone Xs Max")
37+
case .iPhoneXR: print("It's an iPhone Xr")
3238

3339
/*** iPad ***/
3440
case .iPad1: print("It's an iPad 1")
3541
case .iPad2: print("It's an iPad 2")
3642
case .iPad3: print("It's an iPad 3")
3743
case .iPad4: print("It's an iPad 4")
3844
case .iPad5: print("It's an iPad 5")
45+
case .iPad6: print("It's an iPad 6")
3946
case .iPadAir: print("It's an iPad Air")
4047
case .iPadAir2: print("It's an iPad Air 2")
4148
case .iPadMini: print("It's an iPad Mini")
@@ -68,6 +75,8 @@ class ViewController: UIViewController {
6875
case .screen4_7Inch: print("It's a 4.7 inch screen")
6976
case .screen5_5Inch: print("It's a 5.5 inch screen")
7077
case .screen5_8Inch: print("It's a 5.8 inch screen")
78+
case .screen6_1Inch: print("It's a 6.1 inch screen")
79+
case .screen6_5Inch: print("It's a 6.8 inch screen")
7180
case .screen7_9Inch: print("It's a 7.9 inch screen")
7281
case .screen9_7Inch: print("It's a 9.7 inch screen")
7382
case .screen10_5Inch: print("It's a 10.5 inch screen")

Carthage/Checkouts/Device/README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Platform](https://img.shields.io/cocoapods/p/Device.svg?style=flat)](http://cocoapods.org/pods/Device)
66
![](https://img.shields.io/badge/Supported-iOS8%20%7C%20OSX%2010.10-4BC51D.svg?style=flat-square)
77
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
8-
![](https://img.shields.io/badge/Swift-3.0.2-orange.svg?style=flat)
8+
![](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat)
99
[![Twitter](https://img.shields.io/badge/Twitter-@LucasEkhoo-blue.svg?style=flat)](http://twitter.com/LucasEkhoo)
1010

1111
Device detect the current  device model and screen size.
@@ -16,7 +16,7 @@ Device is available through [CocoaPods](http://cocoapods.org). To install
1616
it, simply add the following line to your Podfile:
1717

1818
```ruby
19-
pod "Device", '~> 3.1.0'
19+
pod "Device", '~> 3.1.2'
2020
```
2121

2222
## Carthage
@@ -33,7 +33,7 @@ $ brew install carthage
3333
To integrate Device into your Xcode project using Carthage, specify it in your `Cartfile`:
3434

3535
```ogdl
36-
github "Ekhoo/Device" ~> 3.1.0
36+
github "Ekhoo/Device" ~> 3.1.2
3737
```
3838

3939
Run `carthage update` to build the framework and drag the built `Device.framework` into your Xcode project.
@@ -55,20 +55,31 @@ func myFunc() {
5555
case .iPhone6S: print("It's an iPhone 6S")
5656
case .iPhone6Plus: print("It's an iPhone 6 Plus")
5757
case .iPhone6SPlus: print("It's an iPhone 6 S Plus")
58+
case .iPhoneSE: print("It's an iPhone SE")
59+
case .iPhone7: print("It's an iPhone 7")
60+
case .iPhone7Plus: print("It's an iPhone 7 Plus")
61+
case .iPhone8: print("It's an iPhone 8")
62+
case .iPhone8Plus: print("It's an iPhone 8 Plus")
63+
case .iPhoneX: print("It's an iPhone X")
64+
case .iPhoneXS: print("It's an iPhone Xs")
65+
case .iPhoneXS_Max: print("It's an iPhone Xs Max")
66+
case .iPhoneXR: print("It's an iPhone Xr")
5867

5968
/*** iPad ***/
6069
case .iPad1: print("It's an iPad 1")
6170
case .iPad2: print("It's an iPad 2")
6271
case .iPad3: print("It's an iPad 3")
6372
case .iPad4: print("It's an iPad 4")
6473
case .iPad5: print("It's an iPad 5")
74+
case .iPad6: print("It's an iPad 6")
6575
case .iPadAir: print("It's an iPad Air")
6676
case .iPadAir2: print("It's an iPad Air 2")
6777
case .iPadMini: print("It's an iPad Mini")
6878
case .iPadMini2: print("It's an iPad Mini 2")
6979
case .iPadMini3: print("It's an iPad Mini 3")
7080
case .iPadMini4: print("It's an iPad Mini 4")
7181
case .iPadPro9_7Inch: print("It's an iPad Pro 9.7 Inch")
82+
case .iPadPro10_5Inch: print("It's an iPad Pro 10.5 Inch")
7283
case .iPadPro12_9Inch: print("It's an iPad Pro 12.9 Inch")
7384

7485
/*** iPod ***/
@@ -98,8 +109,11 @@ func myFunc() {
98109
case .screen4_7Inch: print("It's a 4.7 inch screen")
99110
case .screen5_5Inch: print("It's a 5.5 inch screen")
100111
case .screen5_8Inch: print("It's a 5.8 inch screen")
112+
case .screen6_1Inch: print("It's a 6.1 inch screen")
113+
case .screen6_5Inch: print("It's a 6.8 inch screen")
101114
case .screen7_9Inch: print("It's a 7.9 inch screen")
102115
case .screen9_7Inch: print("It's a 9.7 inch screen")
116+
case .screen10_5Inch: print("It's a 10.5 inch screen")
103117
case .screen12_9Inch: print("It's a 12.9 inch screen")
104118
default: print("Unknown size")
105119
}

Carthage/Checkouts/Device/Source/Size.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,27 @@
99
public enum Size: Int, Comparable {
1010
case unknownSize = 0
1111
#if os(iOS)
12+
/// iPhone 4, 4s, iPod Touch 4th gen.
1213
case screen3_5Inch
14+
/// iPhone 5, 5s, 5c, SE, iPod Touch 5-6th gen.
1315
case screen4Inch
16+
/// iPhone 6, 6s, 7, 8
1417
case screen4_7Inch
18+
/// iPhone 6+, 6s+, 7+, 8+
1519
case screen5_5Inch
20+
/// iPhone X, Xs
1621
case screen5_8Inch
22+
/// iPhone Xr
23+
case screen6_1Inch
24+
/// iPhone Xs Max
25+
case screen6_5Inch
26+
/// iPad Mini
1727
case screen7_9Inch
28+
/// iPad
1829
case screen9_7Inch
30+
/// iPad Pro (10.5-inch)
1931
case screen10_5Inch
32+
/// iPad Pro (12.9-inch)
2033
case screen12_9Inch
2134
#elseif os(OSX)
2235
case screen11Inch

Carthage/Checkouts/Device/Source/Version.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ public enum Version: String {
2323
case iPhone8
2424
case iPhone8Plus
2525
case iPhoneX
26+
case iPhoneXS
27+
case iPhoneXS_Max
28+
case iPhoneXR
2629

2730
/*** iPad ***/
2831
case iPad1
2932
case iPad2
3033
case iPad3
3134
case iPad4
3235
case iPad5
36+
case iPad6
3337
case iPadAir
3438
case iPadAir2
3539
case iPadMini

DeviceLayout.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
);
229229
runOnlyForDeploymentPostprocessing = 0;
230230
shellPath = /bin/sh;
231-
shellScript = "/usr/local/bin/carthage copy-frameworks";
231+
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
232232
};
233233
/* End PBXShellScriptBuildPhase section */
234234

@@ -308,6 +308,7 @@
308308
SDKROOT = iphoneos;
309309
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
310310
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
311+
SWIFT_VERSION = 4.2;
311312
TARGETED_DEVICE_FAMILY = "1,2";
312313
VERSIONING_SYSTEM = "apple-generic";
313314
VERSION_INFO_PREFIX = "";
@@ -354,6 +355,7 @@
354355
MTL_ENABLE_DEBUG_INFO = NO;
355356
SDKROOT = iphoneos;
356357
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
358+
SWIFT_VERSION = 4.2;
357359
TARGETED_DEVICE_FAMILY = "1,2";
358360
VALIDATE_PRODUCT = YES;
359361
VERSIONING_SYSTEM = "apple-generic";
@@ -380,7 +382,7 @@
380382
PRODUCT_BUNDLE_IDENTIFIER = cruz.DeviceLayout;
381383
PRODUCT_NAME = "$(TARGET_NAME)";
382384
SKIP_INSTALL = YES;
383-
SWIFT_VERSION = 4.0;
385+
SWIFT_VERSION = 4.2;
384386
};
385387
name = Debug;
386388
};
@@ -403,7 +405,7 @@
403405
PRODUCT_BUNDLE_IDENTIFIER = cruz.DeviceLayout;
404406
PRODUCT_NAME = "$(TARGET_NAME)";
405407
SKIP_INSTALL = YES;
406-
SWIFT_VERSION = 4.0;
408+
SWIFT_VERSION = 4.2;
407409
};
408410
name = Release;
409411
};

0 commit comments

Comments
 (0)