Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
With the following output on console::
Hello Raven App
ProcessName: sysinfo
HostName: qua-nons-macbook-pro.local
OS Version: Version 9.2 (Build 13C75)
ProcessorCount: 4
DeviceName: iPhone Simulator
SystemName: iPhone OS
UI Idiom: 0
Orientation: 1
SystemVersion: 9.2
DeviceModel iPhone
LocalizedModel: iPhone
F377A3B8-45B4-48F9-B4AE-BF3262C9EE6D
BatteryState: 0
from kivy.app import App
from kivy.factory import Factory
from pyobjus import autoclass
from pyobjus.dylib_manager import load_framework
from plyer.facades import UniqueID
#load_framework('/System/Library/Frameworks/UIKit.framework')
UIDevice = autoclass('UIDevice')
NSProcessInfo = autoclass('NSProcessInfo')
processInfo = NSProcessInfo.processInfo()
class RavenApp(App):
def build(self):
return Factory.Button()
def on_start(self):
print "Hello Raven App"
print 'ProcessName: ', processInfo.processName.cString()
print 'HostName: ', processInfo.hostName.cString()
print 'OS Version: ', processInfo.operatingSystemVersionString.cString()
print 'ProcessorCount: ', processInfo.processorCount
currentDevice = UIDevice.currentDevice()
print 'DeviceName: ', currentDevice.name.cString()
print 'SystemName: ', currentDevice.systemName.cString()
print 'UI Idiom: ', currentDevice.userInterfaceIdiom
print 'Orientation: ', currentDevice.orientation
print 'SystemVersion: ', currentDevice.systemVersion.cString()
print 'DeviceModel ', currentDevice.model.cString()
print 'LocalizedModel: ', currentDevice.localizedModel.cString()
print currentDevice.identifierForVendor.UUIDString().cString()
print 'BatteryState:', currentDevice.batteryState
if __name__ == '__main__':
RavenApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.