-
Notifications
You must be signed in to change notification settings - Fork 458
/
UIDevice-Capabilities.h
103 lines (91 loc) · 6.57 KB
/
UIDevice-Capabilities.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
Erica Sadun, http://ericasadun.com
iPhone Developer's Cookbook, 3.0 Edition
BSD License, Use at your own risk
*/
#import <UIKit/UIKit.h>
/*
THIS CATEGORY IS NOT APP STORE SAFE AT THIS TIME. DO NOT USE IN PRODUCTION CODE.
YOU CAN, HOWEVER, USE THIS TO HELP BUILD YOUR OWN CUSTOM CODE TO PRE_COMPUTE CAPABILITIES.
*/
/*
See http://iphonedevwiki.net/index.php/GSCapability for information about what some of these items are
Thanks DB42
*/
/*
This category remains for historic reasons. It is no longer being maintained
*/
#define UIDevice720pPlaybackCapability @"720p"
#define UIDeviceARMV6ExecutionCapability @"armv6"
#define UIDeviceARMV7ExecutionCapability @"armv7"
#define UIDeviceAccelerometerCapability @"accelerometer"
#define UIDeviceAccessibilityCapability @"accessibility"
#define UIDeviceAppleInternalInstallCapability @"apple-internal-install"
#define UIDeviceAutoFocusCameraCapability @"auto-focus-camera"
#define UIDeviceBluetoothCapability @"bluetooth"
#define UIDeviceCameraCapability @"still-camera"
#define UIDeviceCameraFlashCapability @"camera-flash"
#define UIDeviceCellularDataCapability @"cellular-data"
#define UIDeviceContainsCellularRadioCapability @"contains-cellular-radio"
#define UIDeviceDataPlanCapability @"data-plan"
#define UIDeviceDelaySleepForHeadsetClickCapability @"delay-sleep-for-headset-click"
#define UIDeviceDisplayFCCLogosViaSoftwareCapability @"fcc-logos-via-software"
#define UIDeviceDisplayIdentifiersCapability @"application-display-identifiers"
#define UIDeviceDisplayPortCapability @"displayport"
#define UIDeviceEncodeAACCapability @"encode-aac"
#define UIDeviceEncryptedDataPartitionCapability @"encrypted-data-partition"
#define UIDeviceFrontFacingCameraCapability @"front-facing-camera"
#define UIDeviceGPSCapability @"gps"
#define UIDeviceGasGaugeBatteryCapability @"gas-gauge-battery"
#define UIDeviceGreenTeaDeviceCapability @"green-tea" // China only feature
#define UIDeviceGyroscopeCapability @"gyroscope"
#define UIDeviceH264EncoderCapability @"h264-encoder"
#define UIDeviceHasAllFeaturesCapability @"all-features"
#define UIDeviceHiDPICapability @"hidpi"
#define UIDeviceHideNonDefaultApplicationsCapability @"hide-non-default-apps"
#define UIDeviceIOSurfaceBackedImagesCapability @"io-surface-backed-images"
#define UIDeviceInternationalSettingsCapability @"international-settings"
#define UIDeviceLaunchApplicationsWhileAnimatingCapability @"launch-applications-while-animating"
#define UIDeviceLoadThumbnailsWhileScrollingCapability @"load-thumbnails-while-scrolling"
#define UIDeviceLocationServicesCapability @"location-services"
#define UIDeviceMMSCapability @"mms"
#define UIDeviceMagnetometerCapability @"magnetometer"
#define UIDeviceMicrophoneCapability @"microphone"
#define UIDeviceMultitaskingCapability @"multitasking"
#define UIDeviceNikeIpodCapability @"nike-ipod"
#define UIDeviceNotGreenTeaDeviceCapability @"not-green-tea"
#define UIDeviceOpenGLES1Capability @"opengles-1"
#define UIDeviceOpenGLES2Capability @"opengles-2"
#define UIDevicePeer2PeerCapability @"peer-peer"
#define UIDevicePiezoClickerCapability @"piezo-clicker"
#define UIDevicePlatformStandAloneContactsCapability @"stand-alone-contacts"
#define UIDeviceProximitySensorCapability @"proximity-sensor"
#define UIDeviceRingerSwitchCapability @"ringer-switch"
#define UIDeviceSMSCapability @"sms"
#define UIDeviceSensitiveUICapability @"sensitive-ui"
#define UIDeviceTelephonyCapability @"telephony"
#define UIDeviceTVOutCrossfadeCapability @"tv-out-crossfade"
#define UIDeviceTVOutSettingsCapability @"tv-out-settings"
#define UIDeviceUnifiedIPodCapability @"unified-ipod"
#define UIDeviceVOIPCapability @"voip"
#define UIDeviceVeniceCapability @"venice" // Video Conferencing
#define UIDeviceVideoCameraCapability @"video-camera"
#define UIDeviceVoiceControlCapability @"voice-control"
#define UIDeviceVolumeButtonCapability @"volume-buttons"
#define UIDeviceWiFiCapability @"wifi"
#define UIDeviceWildcatCapability @"wildcat" // iPad features
#define UIDeviceYouTubeCapability @"youtube"
#define UIDeviceYouTubePluginCapability @"youtubePlugin"
// Non binary -- use fetchCapability:, not supportsCapability:
#define UIDeviceScreenDimensionsCapability @"screen-dimensions"
#define UIDeviceTelephonyMaximumGeneration @"telephony-maximum-generation"
#define UIDeviceMarketingNameString @"marketing-name"
#define UIDeviceDeviceNameString @"device-name"
// Boolean values only
#define CAPABILITY_STRINGS ([NSArray arrayWithObjects:UIDevice720pPlaybackCapability, UIDeviceARMV6ExecutionCapability, UIDeviceARMV7ExecutionCapability, UIDeviceAccelerometerCapability, UIDeviceAccessibilityCapability, UIDeviceAppleInternalInstallCapability, UIDeviceAutoFocusCameraCapability, UIDeviceBluetoothCapability, UIDeviceCameraCapability, UIDeviceCameraFlashCapability, UIDeviceCellularDataCapability, UIDeviceContainsCellularRadioCapability, UIDeviceDataPlanCapability, UIDeviceDelaySleepForHeadsetClickCapability, UIDeviceDisplayFCCLogosViaSoftwareCapability, UIDeviceDisplayIdentifiersCapability, UIDeviceDisplayPortCapability, UIDeviceEncodeAACCapability, UIDeviceEncryptedDataPartitionCapability, UIDeviceFrontFacingCameraCapability, UIDeviceGPSCapability, UIDeviceGasGaugeBatteryCapability, UIDeviceGreenTeaDeviceCapability, UIDeviceGyroscopeCapability, UIDeviceH264EncoderCapability, UIDeviceHasAllFeaturesCapability, UIDeviceHiDPICapability, UIDeviceHideNonDefaultApplicationsCapability, UIDeviceIOSurfaceBackedImagesCapability, UIDeviceInternationalSettingsCapability, UIDeviceLaunchApplicationsWhileAnimatingCapability, UIDeviceLoadThumbnailsWhileScrollingCapability, UIDeviceLocationServicesCapability, UIDeviceMMSCapability, UIDeviceMagnetometerCapability, UIDeviceMicrophoneCapability, UIDeviceMultitaskingCapability, UIDeviceNikeIpodCapability, UIDeviceNotGreenTeaDeviceCapability, UIDeviceOpenGLES1Capability, UIDeviceOpenGLES2Capability, UIDevicePeer2PeerCapability, UIDevicePiezoClickerCapability, UIDevicePlatformStandAloneContactsCapability, UIDeviceProximitySensorCapability, UIDeviceRingerSwitchCapability, UIDeviceSMSCapability, UIDeviceSensitiveUICapability, UIDeviceTVOutCrossfadeCapability, UIDeviceTVOutSettingsCapability, UIDeviceUnifiedIPodCapability, UIDeviceVOIPCapability, UIDeviceVeniceCapability, UIDeviceVideoCameraCapability, UIDeviceVoiceControlCapability, UIDeviceVolumeButtonCapability, UIDeviceWiFiCapability, UIDeviceWildcatCapability, UIDeviceYouTubeCapability, UIDeviceYouTubePluginCapability, UIDeviceTelephonyCapability, nil])
@interface UIDevice (Capabilities)
- (BOOL) supportsCapability: (NSString *) capability;
- (id) fetchCapability: (NSString *) capability;
- (NSArray *) capabilityArray;
- (void) scanCapabilities;
@end