Giter Site home page Giter Site logo

serjepatoff / ios-system-services Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shmoopi/ios-system-services

0.0 2.0 0.0 3.66 MB

iOS System Services is a class to gather all available information about a device.

Home Page: http://www.shmoopi.net/

License: MIT License

Objective-C 95.11% C 4.23% Ruby 0.66%

ios-system-services's Introduction

iOS-System-Services

System Services Memory Screenshot             System Services Disk Screenshot

This is a singleton class to gather all available information about a device. It gives you over 60 methods to determine everything about a device, including:

  • Hardware Information
  • Network Information
  • Battery Usage
  • Accelerometer Data
  • Disk Usage
  • Memory Usage

Installation

Version License Platform

iOS System Services is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SystemServices', '~> 2.0.1'

Usage

// Import System Services
#import "SystemServices.h"

// Log all System Information
NSLog(@"All System Information: %@", [SystemServices sharedServices].allSystemInformation);	

Changes

  1. Removed Older/Unavailable Methods
  2. Updated Demo Project
  3. Added CocoaPods Support
  4. Fixed Bugs and Addressed Naming Issues
  5. Deprecated Older/Unavailable Methods

Available Device Information

// System Information

// Properties

/* All System Information in Dictionary Format */
NSDictionary *allSystemInformation;

/* Hardware Information */

// System Uptime (dd hh mm)
NSString *systemsUptime;

// Model of Device
NSString *deviceModel;

// Device Name
NSString *deviceName;

// System Name
NSString *systemName;

// System Version
NSString *systemsVersion;

// System Device Type (Not Formatted = iPhone1,0)
NSString *systemDeviceTypeNotFormatted;

// System Device Type (Formatted = iPhone 1)
NSString *systemDeviceTypeFormatted;

// Get the Screen Width (X)
NSInteger screenWidth;

// Get the Screen Height (Y)
NSInteger screenHeight;

// Get the Screen Brightness
float screenBrightness;

// Multitasking enabled?
BOOL multitaskingEnabled;

// Proximity sensor enabled?
BOOL proximitySensorEnabled;

// Debugger Attached?
BOOL debuggerAttached;

// Plugged In?
BOOL pluggedIn;

// Step-Counting Available?
BOOL stepCountingAvailable;

// Distance Available
BOOL distanceAvailable;

// Floor Counting Available
BOOL floorCountingAvailable;

/* Jailbreak Check */

// Jailbroken?
int jailbroken;

/* Processor Information */

// Number of processors
NSInteger numberProcessors;

// Number of Active Processors
NSInteger numberActiveProcessors;

// Processor Usage Information
NSArray *processorsUsage;

/* Accessory Information */

// Are any accessories attached?
BOOL accessoriesAttached;

// Are headphone attached?
BOOL headphonesAttached;

// Number of attached accessories
NSInteger numberAttachedAccessories;

// Name of attached accessory/accessories (seperated by , comma's)
NSString *nameAttachedAccessories;

/* Carrier Information */

// Carrier Name
NSString *carrierName;

// Carrier Country
NSString *carrierCountry;

// Carrier Mobile Country Code
NSString *carrierMobileCountryCode;

// Carrier ISO Country Code
NSString *carrierISOCountryCode;

// Carrier Mobile Network Code
NSString *carrierMobileNetworkCode;

// Carrier Allows VOIP
BOOL carrierAllowsVOIP;

/* Battery Information */

// Battery Level
float batteryLevel;

// Charging?
BOOL charging;

// Fully Charged?
BOOL fullyCharged;

/* Network Information */

// Get Current IP Address
NSString *currentIPAddress;

// Get External IP Address
NSString *externalIPAddress;

// Get Cell IP Address
NSString *cellIPAddress;

// Get Cell Netmask Address
NSString *cellNetmaskAddress;

// Get Cell Broadcast Address
NSString *cellBroadcastAddress;

// Get WiFi IP Address
NSString *wiFiIPAddress;

// Get WiFi Netmask Address
NSString *wiFiNetmaskAddress;

// Get WiFi Broadcast Address
NSString *wiFiBroadcastAddress;

// Get WiFi Router Address
NSString *wiFiRouterAddress;

// Connected to WiFi?
BOOL connectedToWiFi;

// Connected to Cellular Network?
BOOL connectedToCellNetwork;

/* Process Information */

// Process ID
int processID;

/* Disk Information */

// Total Disk Space
NSString *diskSpace;

// Total Free Disk Space (Raw)
NSString *freeDiskSpaceinRaw;

// Total Free Disk Space (Percentage)
NSString *freeDiskSpaceinPercent;

// Total Used Disk Space (Raw)
NSString *usedDiskSpaceinRaw;

// Total Used Disk Space (Percentage)
NSString *usedDiskSpaceinPercent;

// Get the total disk space in long format
long long longDiskSpace;

// Get the total free disk space in long format
long long longFreeDiskSpace;

/* Memory Information */

// Total Memory
double totalMemory;

// Free Memory (Raw)
double freeMemoryinRaw;

// Free Memory (Percent)
double freeMemoryinPercent;

// Used Memory (Raw)
double usedMemoryinRaw;

// Used Memory (Percent)
double usedMemoryinPercent;

// Active Memory (Raw)
double activeMemoryinRaw;

// Active Memory (Percent)
double activeMemoryinPercent;

// Inactive Memory (Raw)
double inactiveMemoryinRaw;

// Inactive Memory (Percent)
double inactiveMemoryinPercent;

// Wired Memory (Raw)
double wiredMemoryinRaw;

// Wired Memory (Percent)
double wiredMemoryinPercent;

// Purgable Memory (Raw)
double purgableMemoryinRaw;

// Purgable Memory (Percent)
double purgableMemoryinPercent;

/* Accelerometer Information */

// Device Orientation
UIInterfaceOrientation deviceOrientation;

/* Localization Information */

// Country
NSString *country;

// Language
NSString *language;

// TimeZone
NSString *timeZoneSS;

// Currency Symbol
NSString *currency;

/* Application Information */

// Application Version
NSString *applicationVersion;

// Clipboard Content
NSString *clipboardContent;

// Application CPU Usage
float applicationCPUUsage;

/* Universal Unique Identifiers */

// CFUUID
NSString *cfuuid;

Third-Party Plugins

A big thank you to the makers of:

License

Copyright © 2012 Shmoopi LLC [email protected] http://www.shmoopi.net/

If you like what you see here, or on our website, please feel free to drop us a line or purchase one of our applications!

ios-system-services's People

Contributors

shmoopi avatar ewg777 avatar dimohamdy avatar streeter avatar stevemoser avatar qinglong61 avatar olunx avatar maquannene avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.