File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 99
1010enum UIHardwareModel
1111{
12+ UIHardwareModelUnknown = 0 ,
1213 UIHardwareModelSimulator = 1 ,
1314
1415 UIHardwareModeliPhone1G = 2 ,
@@ -49,7 +50,10 @@ enum UIHardwareModel
4950 UIHardwareModeliPhone5cGlobal = 29 ,
5051
5152 UIHardwareModeliPhone5s = 30 ,
52- UIHardwareModeliPhone5sGlobal = 31
53+ UIHardwareModeliPhone5sGlobal = 31 ,
54+
55+ UIHardwareModeliPhone6 = 32 ,
56+ UIHardwareModeliPhone6Plus = 33
5357
5458}; typedef NSUInteger UIHardwareModel;
5559
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ -(UIHardwareModel)hardwareModel
2525
2626 NSString *hwString = [NSString stringWithCString: model encoding: NSUTF8StringEncoding];
2727 free (model);
28+
29+ _hardwareModel = UIHardwareModelUnknown;
30+
31+ NSLog (@" bla: %@ " , hwString);
2832
2933 if ([hwString isEqualToString: @" i386" ] || [hwString isEqualToString: @" x86_64" ])
3034 _hardwareModel = UIHardwareModelSimulator;
@@ -121,6 +125,12 @@ -(UIHardwareModel)hardwareModel
121125
122126 if ([hwString isEqualToString: @" iPad3,6" ])
123127 _hardwareModel = UIHardwareModeliPad4CDMA;
128+
129+ if ([hwString isEqualToString: @" iPhone7,1" ])
130+ _hardwareModel = UIHardwareModeliPhone6Plus;
131+
132+ if ([hwString isEqualToString: @" iPhone7,2" ])
133+ _hardwareModel = UIHardwareModeliPhone6;
124134 }
125135
126136 return _hardwareModel;
You can’t perform that action at this time.
0 commit comments