Latest 1.4.1
Homepage https://github.com/thecatalinstan/CSSystemInfoHelper
License MIT
Platforms ios 6.0, osx 10.8, tvos 9.0, watchos 2.0, requires ARC
Authors

Version Status Platform Carthage compatible MIT License

A utility library for getting system info. It’s meant to provide a more straightforward way of accessing information only available through C APIs and to provide shorthands for the most common usage scenarios.

I’ve used this library when making the criollo.io website in order to display the system the app is running on.

Getting Started

Installation through CocoaPods

Install using CocoaPods by adding this line to your Podfile:

use_frameworks!

target 'MyApp' do
  pod 'CSSystemInfoHelper', '~> 1.2'
end

In your Project

import CSSystemInfoHelper

print("(CSSystemInfoHelper.sharedHelper().systemInfoString)"

Examples

Please note that you can also see usage examples in the example app

Getting IPv4 interfaces and addresses

for (ifname, ipaddr) in CSSystemInfoHelper.sharedHelper().AllIPAddresses {
    print("(ifname): (ipaddr)")
}

Getting System Info from uname(3)

for (key, value) in CSSystemInfoHelper.sharedHelper().systemInfo {
    print("(key): (value)")
}

Getting Human-readable Memory Usage

print(CSSystemInfoHelper.sharedHelper().memoryUsageString)

Getting the device UUID

print(CSSystemInfoHelper.sharedHelper().platformUUID)

on watchOS this cannot yet be done programmatically, so the returned UUID is generated on-the-fly.

What’s Next

Check out the complete documentation on CocoaDocs.

Latest podspec

{
    "name": "CSSystemInfoHelper",
    "version": "1.4.1",
    "license": "MIT",
    "summary": "A utility library for getting system info.",
    "homepage": "https://github.com/thecatalinstan/CSSystemInfoHelper",
    "authors": {
        "Cu0103tu0103lin Stan": "[email protected]"
    },
    "social_media_url": "http://twitter.com/catalinstan",
    "source": {
        "git": "https://github.com/thecatalinstan/CSSystemInfoHelper.git",
        "tag": "1.4.1"
    },
    "module_name": "CSSystemInfoHelper",
    "source_files": "CSSystemInfoHelper/*.{h,m}",
    "public_header_files": "CSSystemInfoHelper/CSSystemInfoHelper.h",
    "platforms": {
        "ios": "6.0",
        "osx": "10.8",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "ios": {
        "frameworks": "Foundation"
    },
    "osx": {
        "frameworks": "Foundation"
    },
    "tvos": {
        "frameworks": "Foundation"
    },
    "watchos": {
        "frameworks": "Foundation"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This