SystemServices 2.0.1

SystemServices 2.0.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布日期最后发布2017年9月

Shmoopi LLC维护。




iOS-System-Services

System Services Memory Screenshot             System Services Disk Screenshot

这是一个单例类,用来收集一个设备所有可用的信息。它提供了超过60个方法来获取与设备相关的所有信息,包括:

  • 硬件信息
  • 网络信息
  • 电池使用情况
  • 加速度计数据
  • 磁盘使用情况
  • 内存使用情况

安装

iOS系统服务可以通过CocoaPods获取。要安装它,只需在Podfile中添加以下行:

pod 'SystemServices', '~> 2.0.0'

变更

  1. 移除了过时/不可用的方法
  2. 更新了示例项目
  3. 添加了CocoaPods支持
  4. 修复了虫虫和命名问题
  5. 弃用了过时/不可用的方法

可用的设备信息

// 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;

    /* 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;

第三方插件

感谢以下制作人:

许可证

版权所有© 2012 Shmoopi LLC [email protected] http://www.shmoopi.net/

如果您喜欢在这里或我们的网站所看到的内容,请随时联系我们或购买我们的应用程序之一!