| 24 | } |
| 25 | |
| 26 | function printDeviceInfoIOS() { |
| 27 | var device = UIDevice.currentDevice; |
| 28 | console.log('device.name = ' + device.name); //device.name = iPhone Simulator |
| 29 | console.log('device.systemName = ' + device.systemName); //device.systemName = iPhone OS |
| 30 | console.log('device.systemVersion = ' + device.systemVersion); //device.systemVersion = 8.1 |
| 31 | console.log('device.model = ' + device.model); //device.model = iPhone Simulator |
| 32 | console.log('device.localizedModel = ' + device.localizedModel); //device.localizedModel = iPhone Simulator |
| 33 | console.log('device.userInterfaceIdiom = ' + device.userInterfaceIdiom); //device.userInterfaceIdiom = 0 |
| 34 | console.log('device.batteryLevel = ' + device.batteryLevel); //device.batteryLevel = -1 |
| 35 | var screen = UIScreen.mainScreen; |
| 36 | console.log('screen = ' + screen); |
| 37 | console.log('screen.nativeBounds = ' + screen.nativeBounds.size.width + ', ' + screen.nativeBounds.size.height); //screen.nativeBounds = 640, 1136 |
| 38 | console.log('screen.scale = ' + screen.scale); //screen.scale = 2 |
| 39 | console.log('screen.nativeScale = ' + screen.nativeScale); //screen.nativeScale = 2 |
| 40 | } |
| 41 | |
| 42 | function printTNSInfo() { |
| 43 | console.log('platform.Device.model = ' + platform.Device.model); |