Coder Social home page Coder Social logo

travelc / alsystemutilities Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andrealufino/alsystemutilities

0.0 1.0 0.0 580 KB

This library provides a list of 80 methods to get every kind of system information!

Ruby 1.19% Objective-C 98.81%

alsystemutilities's Introduction

ALSystemUtilities

In order to use the framework you have to open the project in Xcode and then click on Product -> Archive and drag the .embeddedframework file into the project you want to import it.

When import the .embeddedframework, don't forget to import these frameworks to your project if they're not imported :

  • AssetsLibrary.framework;
  • AudioToolbox.framework;
  • CFNetwork.framework;
  • CoreTelephony.framework;
  • ExternalAccessory.framework;
  • Security.framework;
  • SystemConfiguration.framework;
  • UIKit.framework;
  • CoreGraphics.framework;
  • CoreFoundation.framework;
  • Foundation.framework;

The project is built using the iOS Universal Framework template (Fake framework) by kstenerud (https://github.com/kstenerud/iOS-Universal-Framework?source=cc).

CocoaPods

You can install the library via cocoapods. Use : pod 'ALSystemUtilities'

Overview

The library provides informations for these purviews :

  • battery;
  • disk;
  • hardware;
  • jailbreak;
  • localization;
  • memory (RAM);
  • network;
  • processor;
  • carrier;
  • accessories;

Now I'll explain you what informations are contained for every purview.

Battery

  • + (BOOL)batteryFullCharged;
  • + (BOOL)inCharge;
  • + (BOOL)devicePluggedIntoPower;
  • + (UIDeviceBatteryState)batteryState;
  • + (CGFloat)batteryLevel;
  • + (NSString *)remainingHoursForStandby;
  • + (NSString *)remainingHoursFor3gConversation;
  • + (NSString *)remainingHoursFor2gConversation;
  • + (NSString *)remainingHoursForInternet3g;
  • + (NSString *)remainingHoursForInternetWiFi;
  • + (NSString *)remainingHoursForVideo;
  • + (NSString *)remainingHoursForAudio;

Disk

  • + (NSString *)totalDiskSpace;
  • + (NSString *)freeDiskSpace;
  • + (NSString *)usedDiskSpace;
  • + (CGFloat)totalDiskSpaceInBytes;
  • + (CGFloat)freeDiskSpaceInBytes;
  • + (CGFloat)usedDiskSpaceInBytes;

Hardware

  • + (NSString *)deviceModel;
  • + (NSString *)deviceName;
  • + (NSString *)systemName;
  • + (NSString *)systemVersion;
  • + (NSInteger)screenWidth;
  • + (NSInteger)screenHeight;
  • + (CGFloat)brightness;
  • + (NSString *)platformType;
  • + (NSDate *)bootTime;
  • + (BOOL)proximitySensor;
  • + (BOOL)multitaskingEnabled;
  • + (NSString *)sim;
  • + (NSString *)dimensions;
  • + (NSString *)weight;
  • + (NSString *)displayType;
  • + (NSString *)displayDensity;
  • + (NSString *)WLAN;
  • + (NSString *)bluetooth;
  • + (NSString *)cameraPrimary;
  • + (NSString *)cameraSecondary;
  • + (NSString *)cpu;
  • + (NSString *)gpu;
  • + (BOOL)siri;
  • + (BOOL)touchID;

Jailbreak

  • + (BOOL)isJailbroken;

Localization

  • + (NSString *)language;
  • + (NSString *)timeZone;
  • + (NSString *)currencySymbol;
  • + (NSString *)currencyCode;
  • + (NSString *)country;
  • + (NSString *)measurementSystem;

Memory (RAM)

  • + (NSInteger)totalMemory;
  • + (CGFloat)freeMemory;
  • + (CGFloat)usedMemory;
  • + (CGFloat)activeMemory;
  • + (CGFloat)wiredMemory;
  • + (CGFloat)inactiveMemory;

Network

  • + (NSString *)currentIPAddress;
  • + (BOOL)connectedViaWiFi;
  • + (BOOL)connectedVia3G;
  • + (NSString *)macAddress;
  • + (NSString *)externalIPAddress;
  • + (NSString *)cellIPAddress;
  • + (NSString *)WiFiNetmaskAddress;
  • + (NSString *)WiFiBroadcastAddress;
  • + (NSString *)BSSID;
  • + (NSString *)SSID;

Processor

  • + (NSInteger)processorsNumber;
  • + (NSInteger)activeProcessorsNumber;
  • + (CGFloat)cpuUsageForApp;
  • + (NSArray *)activeProcesses;
  • + (NSInteger)numberOfActiveProcesses;

Carrier

  • + (NSString *)carrierName;
  • + (NSString *)carrierISOCountryCode;
  • + (NSString *)carrierMobileCountryCode;
  • + (NSString *)carrierMobileNetworkCode;
  • + (BOOL)carrierAllowsVOIP;

Accessories

  • + (BOOL)accessoriesPluggedIn;
  • + (NSInteger)numberOfAccessoriesPluggedIn;
  • + (BOOL)isHeadphonesAttached;

So, there are 78 methods to get every kind of information!

All methods are class methods, so you can use the syntax [ALCarrier carrierName]. This make the use of the library very very simple!

If you want to let me know if you use my library in your applications, you are free to send me an email to [email protected] :)

alsystemutilities's People

Contributors

andrealufino avatar kaishin-r avatar

Watchers

 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.