Skip to content

Commit c60f2a9

Browse files
Update README.md
1 parent 72563ea commit c60f2a9

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,31 @@
66

77
## Introduction
88
UIDevice extension to fetch current device info such commercial name (iPhone X instead of iPhone10,3).
9+
10+
## Installation
11+
12+
This framework is compatible with Carthage or Cocoapods, use one of both.
13+
14+
### Carthage: Add this into your `Cartfile`
15+
```ogdl
16+
github "sebastianvarela/iOS-Alert-Controller"
17+
```
18+
19+
### Cocoapods: Add this into your `Podfile`
20+
```ogdl
21+
pod 'DeviceIdentificator'
22+
```
23+
24+
## Usage:
25+
26+
```Swift
27+
let deviceModel = UIDevice.current.deviceModel
28+
print("Current device: \(deviceModel.name)")
29+
30+
let isIpad = UIDevice.current.isIpad
31+
```
32+
33+
```Objective-C
34+
NSString *deviceModelName = [UIDevice currentDevice].deviceModelName
35+
NSLog("Current device: %@", deviceModelName)
36+
```

0 commit comments

Comments
 (0)