Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ DerivedData



SDVersion-Demo/.idea/.gitignore
SDVersion-Demo/.idea/.name
SDVersion-Demo/.idea/encodings.xml
SDVersion-Demo/.idea/modules.xml
SDVersion-Demo/.idea/SDVersion-Demo.iml
SDVersion-Demo/.idea/vcs.xml
SDVersion-Demo/.idea/xcode.xml
44 changes: 44 additions & 0 deletions MCVersion.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#

s.name = "MCVersion"
s.version = "4.3.8"
s.summary = "Lightweight Cocoa library for detecting the running device's model and screen size. 作者不更新,我的一些库依赖SDVersion,故发一个MC版本,见谅. 22春季设备更新"
s.homepage = "https://github.com/poholo/SDVersion"
s.screenshots = "https://dl.dropboxusercontent.com/s/bmfjwfe2ngnivwn/sdversion.png?dl=0"


# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#

s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Sebastian Dobrincu" => "me@dobrincu.co" }
s.platform = :ios
s.platform = :osx
s.platform = :watchos
s.platform = :tvos
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.9'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'
s.ios.source_files = "SDVersion/SDiOSVersion/*.{h,m}"
s.osx.source_files = "SDVersion/SDMacVersion/*.{h,m}"
s.watchos.source_files = "SDVersion/SDwatchOSVersion/*.{h,m}"
s.tvos.source_files = "SDVersion/SDtvOSVersion/*.{h,m}"
s.source = { :git => 'https://github.com/poholo/SDVersion.git', :tag => "#{s.version}" }
s.source_files = "SDVersion/*.{h,m}"

s.requires_arc = true

end
224 changes: 164 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ SDVersion supports iOS, watchOS, tvOS, and macOS. Browse through the implementat
</a>
</p>

```
update log
4.3.7 增加2022年春季设备

```

## How it works

```objective-c
Expand Down Expand Up @@ -111,10 +117,14 @@ CocoaPods is a dependency manager for Objective-C, which automates and simplifie

### Podfile
```ruby
pod 'SDVersion'
pod 'SDVersion', git:'https://github.com/poholo/SDVersion.git'
or
pod 'MCVersion'
```




## iOS

### Available methods
Expand All @@ -128,46 +138,105 @@ CocoaPods is a dependency manager for Objective-C, which automates and simplifie
+ (BOOL)isZoomed;
```
### Targetable models
iPhone4
iPhone4S
iPhone5
iPhone5C
iPhone5S
iPhone6
iPhone6Plus
iPhone6S
iPhone6SPlus
iPhoneSE
iPhone7
iPhone7Plus

iPad1
iPad2
iPadMini
iPad3
iPad4
iPadAir
iPadMini2
iPadAir2
iPadMini3
iPadMini4
iPadPro9Dot7Inch
iPadPro12Dot9Inch
iPad5

iPodTouch1Gen
iPodTouch2Gen
iPodTouch3Gen
iPodTouch4Gen
iPodTouch5Gen
```
iPhone4
iPhone4S
iPhone5
iPhone5C
iPhone5S
iPhone6
iPhone6Plus
iPhone6S
iPhone6SPlus
iPhone7
iPhone7Plus
iPhone8
iPhone8Plus
iPhoneX
iPhoneSE
iPhoneXS
iPhoneXR
iPhoneXSMax
iPhone11
iPhone11Pro
iPhone11ProMax
iPhoneSE2
iPhone12
iPhone12Pro
iPhone12ProMax
iPhone12Mini
iPhone13
iPhone13Pro
iPhone13ProMax
iPhone13Mini
iPhoneSE3
iPhone14
iPhone14Plus
iPhone14Pro
iPhone14ProMax




iPad1
iPad2
iPadMini
iPad3
iPad4
iPadAir
iPadMini2
iPadAir2
iPadMini3
iPadMini4
iPadPro12Dot9Inch
iPadPro9Dot7Inch
iPad5
iPadPro12Dot9Inch2Gen
iPadPro10Dot5Inch
iPadPro11Inch
iPadAir3
iPad6
iPadPro12Dot9Inch4Gen
iPadPro11Inch2Gen
iPad8
iPadAir4
iPadMini6
iPadPro12Dot9Inch5Gen
iPadPro11Inch3Gen
iPad9
iPadAir5

iPodTouch1Gen
iPodTouch2Gen
iPodTouch3Gen
iPodTouch4Gen
iPodTouch5Gen
iPodTouch6Gen
iPodTouch6Gen
iPodTouch7Gen

Simulator
```
### Targetable screen sizes
Screen3Dot5inch
Screen4inch
Screen4Dot7inch
Screen5Dot5inch
```
Screen3Dot5inch,
Screen4inch ,
Screen4Dot7inch,
Screen5Dot5inch,
Screen5Dot4inch,
Screen5Dot8inch,
Screen6Dot1inch,
Screen6Dot5inch,
Screen6Dot7inch,
Screen8Dot3inch,
Screen9Dot7inch,
Screen10Dot2inch,
Screen10Dot9inch,
Screen11inch,
Screen12Dot9inch
```


### Available iOS Version Finder methods
```objective-c
+ (BOOL)versionEqualTo:(NSString *)version;
Expand Down Expand Up @@ -196,22 +265,48 @@ Or in Swift:
### Available methods
```objective-c
+ (DeviceVersion)deviceVersion;
+ (DeviceSize)deviceSize;
+ (NSString *)deviceName;
+ (DeviceSize)deviceSize;
+ (NSString *)deviceName;
```
### Targetable models
Apple Watch 38mm
```
Apple Watch 38mm
Apple Watch 42mm
Apple Watch 38mm Series 1
Apple Watch 42mm Series 1
Apple Watch 38mm Series 2
Apple Watch 42mm Series 2

Apple Watch 38mm Series 3
Apple Watch 42mm Series 3
Apple Watch 40mm Series 4
Apple Watch 44mm Series 4
Apple Watch 40mm Series 5
Apple Watch 44mm Series 5
Apple Watch 40mm SE
Apple Watch 44mm SE
Apple Watch 40mm Series 6
Apple Watch 44mm Series 6
Apple Watch 41mm Series7
Apple Watch 45mm Series7
AppleWatch40mmSE2 ,
AppleWatch44mmSE2 ,
AppleWatch41mmSeries8 ,
AppleWatch45mmSeries8 ,
AppleWatch49mmUltra ,

Simulator
```

### Targetable screen sizes
```
Screen38mm
Screen40mm
Screen41mm
Screen42mm
Screen44mm
Screen45mm
Screen49mm
```

### Available watchOS Version Finder methods
```objective-c
Expand Down Expand Up @@ -239,8 +334,11 @@ Or in Swift:
+ (NSString *)deviceName;
```
### Targetable models
Apple TV (4th Generation)

Apple TV (4th Generation)
Apple TV 4K
Apple TV 4K(2nd Generation)
Apple TV 4K(2nd Generation 1080p)

Simulator

### Available tvOS Version Finder methods
Expand All @@ -254,7 +352,7 @@ Or in Swift:

### Helpers
```objective-c
NSLog(@"%@", [SDVersion deviceVersionName:[SDVersion deviceVersion]]);
NSLog(@"%@", [SDVersion deviceVersionName:[SDVersion deviceVersion]]);
/* e.g: Outputs 'Apple TV (4th Generation)' */
```

Expand Down Expand Up @@ -294,28 +392,34 @@ Or in Swift:
+ (DeviceScreenResolution)deviceScreenResolution;
```
### Targetable models
DeviceVersionIMac
DeviceVersionMacMini
DeviceVersionMacPro
DeviceVersionMacBook
DeviceVersionMacBookAir
DeviceVersionMacBookPro
DeviceVersionXserve
```
DeviceVersionIMac
DeviceVersionMacMini
DeviceVersionMacPro
DeviceVersionMacBook
DeviceVersionMacBookAir
DeviceVersionMacBookPro
DeviceVersionXserve
```

### Targetable screen sizes
```
Mac27Inch
Mac24Inch
Mac21Dot5Inch
Mac20Inch
Mac17Inch
Mac15Inch
Mac13Inch
Mac12Inch
Mac11Inch
Mac24Inch
Mac21Dot5Inch
Mac20Inch
Mac17Inch
Mac15Inch
Mac13Inch
Mac12Inch
Mac11Inch
```

### Targetable screen resolutions
```
DeviceScreenRetina,
DeviceScreenNoRetina
DeviceScreenNoRetina
```

### Available OSX Version Finder methods
```objective-c
Expand Down
Loading