sebyddd/SDVersion

Missing some code

Closed this issue · 1 comments

Hi, @sebyddd,
I found a problem, when I use SDVersion v3.0.1 via CocoaPods, it's missing some code like the following in SDiOSVersion.h. My CocoaPods version is 1.0.0.

#define stringFromDeviceVersion(v) [@{@(3):@"iPhone 4", @(4):@"iPhone 4S", @(5):@"iPhone 5", @(6):@"iPhone 5C", @(7):@"iPhone 5S", @(8):@"iPhone 6", @(9): @"iPhone 6 Plus", @(10):@"iPhone 6S", @(11): @"iPhone 6S Plus", @(12):@"iPad 1", @(13):@"iPad 2", @(14):@"iPad Mini", @(15):@"iPad 3", @(16):@"iPad 4", @(17):@"iPad Air", @(18):@"iPad Mini 2", @(19):@"iPad Air 2", @(20):@"iPad Mini 3", @(21):@"iPad Mini 4", @(22):@"iPad Pro", @(23):@"iPod Touch 1st Gen", @(24):@"iPod Touch 2nd Gen", @(25):@"iPod Touch 3rd Gen", @(26):@"iPod Touch 4th Gen", @(27):@"iPod Touch 5th Gen", @(28):@"iPod Touch 6th Gen", @(0):@"Simulator"} objectForKey:[NSNumber numberWithInteger:v]]
#define stringFromDeviceSize(v) [@{@(0):@"Unknown Size", @(1):@"3.5 inch", @(2):@"4 inch", @(3):@"4.7 inch", @(4):@"5.5 inch"} objectForKey:[NSNumber numberWithInteger:v]]

I don't know why, hope to help me, thank you!

@yzxcool123, you can now get the device size and version in string format using
DeviceVersionNames[[SDVersion deviceVersion]] and DeviceSizeNames[[SDVersion deviceSize]].