Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
StefaniOSApps authored Jul 1, 2020
1 parent 0a9d6e7 commit e5aed29
Showing 1 changed file with 48 additions and 5 deletions.
53 changes: 48 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,56 @@ $ pod install
```

## Example

##### Swift
```swift
print(UIDevice.current.formattedName)
// iPhone 11 Pro Max
print(UIDevice.current.info.system.name)
// String: x86_64

print(UIDevice.current.info.system.formatted.name)
// String?: iPhone 11 Pro Max

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

print(UIDevice.current.info.system.upTime)
// TimeInterval: 238443.2

print(UIDevice.current.info.secure.isJailBroken)
// Bool: false

print(UIDevice.current.info.system.version)
// String: 13.0.1

print(UIDevice.current.info.processor.count)
// Int: 6

print(UIDevice.current.info.processor.activeCount)
// Int: 4
```

##### Objective-C
```objective-c
NSLog(@"%@", [UIDevice currentDevice].formattedName)
// iPad PRO 11" (Wifi)
NSLog(@"%@", [UIDevice currentDevice].info.system.name)
// NSString: x86_64

NSLog(@"%@", [UIDevice currentDevice].info.system.formatted.name)
// NSString?: iPhone 11 Pro Max

NSLog(@"%@", [[UIDevice currentDevice].info.system.formatted upTimeWithUnitsStyle:NSDateComponentsFormatterUnitsStyleShort])
// NSString?: 2 days, 18 hr, 14 min, 3 sec

NSLog(@"%@", [UIDevice currentDevice].info.system.upTime)
// NSTimeInterval: 238443.2

NSLog(@"%@", [UIDevice currentDevice].info.secure.isJailBroken)
// BOOL: NO

NSLog(@"%@", [UIDevice currentDevice].info.system.version)
// NSString: 13.0.1

NSLog(@"%@", [UIDevice currentDevice].info.processor.count)
// NSInteger: 6

NSLog(@"%@", [UIDevice currentDevice].info.processor.activeCount)
// NSInteger: 4
```

0 comments on commit e5aed29

Please sign in to comment.