From df2f75f3bea534f7d21eeb3d2397c75eb27d98d0 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Thu, 21 Mar 2019 15:45:36 +0200 Subject: [PATCH] iOS UIDevice properties --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/README.md b/README.md index bdbc026..38841eb 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ * [`Describe class members`](#describe-class-members) * [`Class hierarchy`](#class-hierarchy) * [`Hook refelaction`](#hook-refelaction) +* [`Device properties`](#device-properties) @@ -1357,6 +1358,76 @@ TODO
[⬆ Back to top](#table-of-contents) + + +#### Device properties +Example of quick&dirty iOS device properties extraction + +```js +var UIDevice = ObjC.classes.UIDevice.currentDevice(); +UIDevice.$ownMethods + .filter(function(method) { + return method.indexOf(':') == -1 /* filter out methods with parameters */· + && method.indexOf('+') == -1 /* filter out public methods */ + }) + .forEach(function(method) { + console.log(method, ':', UIDevice[method]()) + }) + +``` + +
+Output example + +``` +- sbf_bannerGraphicsQuality : 100 +- sbf_controlCenterGraphicsQuality : 100 +- sbf_homeScreenFolderGraphicsQuality : 100 +- sbf_searchTransitionGraphicsQuality : 100 +- sbf_dashBoardPresentationGraphicsQuality : 100 +- sbf_homeScreenBlurGraphicsQuality : 100 +- userInterfaceIdiom : 0 +- _supportsDeepColor : false +- name : iPhone +- _keyboardGraphicsQuality : 100 +- isGeneratingDeviceOrientationNotifications : true +- orientation : 1 +- _backlightLevel : 1 +- isProximityMonitoringEnabled : false +- systemVersion : 11.1.1 +- _graphicsQuality : 100 +- beginGeneratingDeviceOrientationNotifications : undefined +- endGeneratingDeviceOrientationNotifications : undefined +- buildVersion : 15C222 +- systemName : iOS +- _isSystemSoundEnabled : true +- _feedbackSupportLevel : 1 +- model : iPhone +- _supportsForceTouch : true +- localizedModel : iPhone +- identifierForVendor : 4A7B44DB-AAAA-BBB-CCC-D8819581DDD +- isBatteryMonitoringEnabled : false +- batteryState : 0 +- batteryLevel : -1 +- proximityState : false +- isMultitaskingSupported : true +- playInputClick : undefined +- _softwareDimmingAlpha : 0 +- _playInputSelectSound : undefined +- _playInputDeleteSound : undefined +- _hasGraphicsQualityOverride : false +- _hasTouchPad : false +- _clearGraphicsQualityOverride : undefined +- _predictionGraphicsQuality : 100 +- _nativeScreenGamut : 0 +- _tapticEngine : <_UITapticEngine: 0x1c06257c0> +``` + +
+ +
[⬆ Back to top](#table-of-contents) + + #### TODOs - Add GIFs & examples - Add links to /scripts