BIASystemKit 2.1

BIASystemKit 2.1

Stefan Nebel 维护。



  • 作者:Stefan Nebel
  • Stefan Nebel

Swift Cocoapods Carthage codebeat badge iOS License

BIASystemKit 是一个 iOS 框架,可以简单获取设备名称!

安装

要求

语言 分支 Pod 版本 Xcode 版本 iOS 版本
Swift 5.3 master >= 2.0.x Xcode 12.0+ iOS 9.0+

CocoaPods

CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它

$ gem install cocoapods

要将 BIASystemKit 集成到您的 Xcode 项目中使用 CocoaPods,请在您的 Podfile 中指定它

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'BIASystemKit'
end

然后,运行以下命令

$ pod install

示例

print(BIAInfo.device(for: .current).modelName)
// String: x86_64

print(BIAInfo.device(for: .current).formattedName)
// String?: iPhone 11 Pro Max

print(BIAInfo.device(for: .current).version)
// String: 13.0.1

print(BIAInfo.system.upTime(unitsStyle: .short))
// String?: 2 days, 18 hr, 14 min, 3 sec

print(BIAInfo.system.upTime)
// TimeInterval: 238443.2

print(BIAInfo.secure.isJailBroken)
// Bool: false

print(BIAInfo.processor.count)
// Int: 6

print(BIAInfo.processor.activeCount)
// Int: 4