Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reviewed the device files for the current 3.1.2 software and updated …

…the UIDevice-Hardware category accordingly. Working on Reachability next.
  • Loading branch information...
commit 530217af156ebfef08ef13f4dbafc3d6ededf575 1 parent 9d91b53
Erica Sadun authored
Showing with 37 additions and 28 deletions.
  1. +3 −3 UIDevice-Hardware.h
  2. +34 −25 UIDevice-Hardware.m
View
6 UIDevice-Hardware.h
@@ -67,9 +67,9 @@ enum {
UIDeviceSupportsExternalMicrophone = 1 << 11,
UIDeviceSupportsOPENGLES1_1 = 1 << 12,
UIDeviceSupportsOPENGLES2 = 1 << 13,
- UIDeviceBuiltInSpeaker = 1 << 14,
+ UIDeviceSupportsBuiltInSpeaker = 1 << 14,
UIDeviceSupportsVibration = 1 << 15,
- UIDeviceBuiltInProximitySensor = 1 << 16,
+ UIDeviceSupportsBuiltInProximitySensor = 1 << 16,
UIDeviceSupportsAccessibility = 1 << 17,
UIDeviceSupportsVoiceOver = 1 << 18,
UIDeviceSupportsVoiceControl = 1 << 19,
@@ -80,7 +80,7 @@ enum {
UIDeviceSupportsBluetooth = 1 << 24,
UIDeviceSupportsNike = 1 << 25,
UIDeviceSupportsPiezoClicker = 1 << 26,
- UIDeviceSupportVolumeButtons = 1 << 27,
+ UIDeviceSupportsVolumeButtons = 1 << 27,
};
/*
View
59 UIDevice-Hardware.m
@@ -176,9 +176,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
// UIDeviceSupportsOPENGLES2 |
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker |
UIDeviceSupportsVibration |
- UIDeviceBuiltInProximitySensor |
+ UIDeviceSupportsBuiltInProximitySensor |
// UIDeviceSupportsAccessibility |
// UIDeviceSupportsVoiceOver |
// UIDeviceSupportsVoiceControl |
@@ -189,7 +189,7 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsBluetooth | // M68.plist says YES for this
// UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- UIDeviceSupportVolumeButtons
+ UIDeviceSupportsVolumeButtons
);
case UIDevice3GiPhone:
@@ -208,9 +208,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
// UIDeviceSupportsOPENGLES2 |
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker |
UIDeviceSupportsVibration |
- UIDeviceBuiltInProximitySensor |
+ UIDeviceSupportsBuiltInProximitySensor |
// UIDeviceSupportsAccessibility |
// UIDeviceSupportsVoiceOver |
// UIDeviceSupportsVoiceControl |
@@ -221,7 +221,7 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsBluetooth |
UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- UIDeviceSupportVolumeButtons
+ UIDeviceSupportsVolumeButtons
);
case UIDevice3GSiPhone:
@@ -240,9 +240,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
UIDeviceSupportsOPENGLES2 |
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker |
UIDeviceSupportsVibration |
- UIDeviceBuiltInProximitySensor |
+ UIDeviceSupportsBuiltInProximitySensor |
UIDeviceSupportsAccessibility |
UIDeviceSupportsVoiceOver |
UIDeviceSupportsVoiceControl |
@@ -253,7 +253,7 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsBluetooth |
UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- UIDeviceSupportVolumeButtons
+ UIDeviceSupportsVolumeButtons
);
case UIDeviceUnknowniPhone: return 0;
@@ -273,9 +273,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
// UIDeviceSupportsOPENGLES2 |
- // UIDeviceBuiltInSpeaker |
+ // UIDeviceSupportsBuiltInSpeaker |
// UIDeviceSupportsVibration |
- // UIDeviceBuiltInProximitySensor |
+ // UIDeviceSupportsBuiltInProximitySensor |
// UIDeviceSupportsAccessibility |
// UIDeviceSupportsVoiceOver |
// UIDeviceSupportsVoiceControl |
@@ -283,8 +283,8 @@ - (NSUInteger) platformCapabilities
// UIDeviceSupportsEncodeAAC |
// UIDeviceSupportsBluetooth |
// UIDeviceSupportsNike |
- UIDeviceSupportsPiezoClicker |
- // UIDeviceSupportVolumeButtons
+ UIDeviceSupportsPiezoClicker
+ // UIDeviceSupportsVolumeButtons
);
case UIDevice2GiPod:
@@ -304,9 +304,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
// UIDeviceSupportsOPENGLES2 |
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker |
// UIDeviceSupportsVibration |
- // UIDeviceBuiltInProximitySensor |
+ // UIDeviceSupportsBuiltInProximitySensor |
// UIDeviceSupportsAccessibility |
// UIDeviceSupportsVoiceOver |
// UIDeviceSupportsVoiceControl |
@@ -317,7 +317,7 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsBluetooth |
UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- UIDeviceSupportVolumeButtons
+ UIDeviceSupportsVolumeButtons
);
@@ -337,9 +337,9 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsExternalMicrophone |
UIDeviceSupportsOPENGLES1_1 |
UIDeviceSupportsOPENGLES2 |
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker |
// UIDeviceSupportsVibration |
- // UIDeviceBuiltInProximitySensor |
+ // UIDeviceSupportsBuiltInProximitySensor |
UIDeviceSupportsAccessibility |
UIDeviceSupportsVoiceOver |
UIDeviceSupportsVoiceControl |
@@ -350,7 +350,7 @@ - (NSUInteger) platformCapabilities
UIDeviceSupportsBluetooth |
UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- UIDeviceSupportVolumeButtons
+ UIDeviceSupportsVolumeButtons
);
case UIDeviceUnknowniPod: return 0;
@@ -372,9 +372,9 @@ - (NSUInteger) platformCapabilities
// UIDeviceSupportsOPENGLES2 |
UIDeviceSupportsAccessibility | // with limitations
UIDeviceSupportsVoiceOver | // with limitations
- UIDeviceBuiltInSpeaker |
+ UIDeviceSupportsBuiltInSpeaker
// UIDeviceSupportsVibration |
- // UIDeviceBuiltInProximitySensor |
+ // UIDeviceSupportsBuiltInProximitySensor |
// UIDeviceSupportsVoiceControl |
// UIDeviceSupportsPeerToPeer |
// UIDeviceSupportsARMV7 |
@@ -383,7 +383,7 @@ - (NSUInteger) platformCapabilities
// UIDeviceSupportsBluetooth |
// UIDeviceSupportsNike |
// UIDeviceSupportsPiezoClicker |
- // UIDeviceSupportVolumeButtons
+ // UIDeviceSupportsVolumeButtons
);
default: return 0;
}
@@ -399,25 +399,34 @@ - (NSArray *) capabilityArray
if (flags & UIDeviceSupportsStillCamera) [array addObject:@"Still Camera"];
if (flags & UIDeviceSupportsAutofocusCamera) [array addObject:@"AutoFocus Camera"];
if (flags & UIDeviceSupportsVideoCamera) [array addObject:@"Video Camera"];
+
if (flags & UIDeviceSupportsWifi) [array addObject:@"WiFi"];
if (flags & UIDeviceSupportsAccelerometer) [array addObject:@"Accelerometer"];
if (flags & UIDeviceSupportsLocationServices) [array addObject:@"Location Services"];
if (flags & UIDeviceSupportsGPS) [array addObject:@"GPS"];
if (flags & UIDeviceSupportsMagnetometer) [array addObject:@"Magnetometer"];
+
if (flags & UIDeviceSupportsBuiltInMicrophone) [array addObject:@"Built-in Microphone"];
if (flags & UIDeviceSupportsExternalMicrophone) [array addObject:@"External Microphone Support"];
if (flags & UIDeviceSupportsOPENGLES1_1) [array addObject:@"OpenGL ES 1.1"];
if (flags & UIDeviceSupportsOPENGLES2) [array addObject:@"OpenGL ES 2.x"];
- if (flags & UIDeviceBuiltInSpeaker) [array addObject:@"Built-in Speaker"];
+ if (flags & UIDeviceSupportsBuiltInSpeaker) [array addObject:@"Built-in Speaker"];
+
if (flags & UIDeviceSupportsVibration) [array addObject:@"Vibration"];
- if (flags & UIDeviceBuiltInProximitySensor) [array addObject:@"Proximity Sensor"];
+ if (flags & UIDeviceSupportsBuiltInProximitySensor) [array addObject:@"Proximity Sensor"];
if (flags & UIDeviceSupportsAccessibility) [array addObject:@"Accessibility"];
if (flags & UIDeviceSupportsVoiceOver) [array addObject:@"VoiceOver"];
if (flags & UIDeviceSupportsVoiceControl) [array addObject:@"Voice Control"];
+
if (flags & UIDeviceSupportsBrightnessSensor) [array addObject:@"Brightness Sensor"];
if (flags & UIDeviceSupportsPeerToPeer) [array addObject:@"Peer to Peer Bluetooth"];
if (flags & UIDeviceSupportsARMV7) [array addObject:@"The armv7 instruction set"];
- if (flags & UIDeviceSupportsEncodeAAC
+ if (flags & UIDeviceSupportsEncodeAAC) [array addObject:@"AAC Encoding"];
+ if (flags & UIDeviceSupportsBluetooth) [array addObject:@"Basic Bluetooth"];
+
+ if (flags & UIDeviceSupportsNike) [array addObject:@"Nike"];
+ if (flags & UIDeviceSupportsPiezoClicker) [array addObject:@"Piezo clicker"];
+ if (flags & UIDeviceSupportsVolumeButtons) [array addObject:@"Physical volume rocker"];
return array;
}
Please sign in to comment.
Something went wrong with that request. Please try again.