|
1 | | -[](https://github.com/apple/swift) |
2 | | -[](https://github.com/apple/swift-package-manager) |
3 | | -[](https://en.wikipedia.org/wiki/List_of_Apple_operating_systems) |
4 | | -[](https://github.com/backslash-f/device/actions?query=workflow%3ACI) |
5 | | -[](https://en.wikipedia.org/wiki/MIT_License) |
| 1 | +[](https://developer.apple.com/swift/) |
| 2 | +[](https://developer.apple.com/xcode/) |
| 3 | +[](https://developer.apple.com/documentation/xcode/swift-packages) |
| 4 | +[](https://en.wikipedia.org/wiki/List_of_Apple_operating_systems) |
| 5 | +[](https://en.wikipedia.org/wiki/MIT_License) |
| 6 | +[](https://github.com/thatfactory/device/actions/workflows/release.yml) |
6 | 7 |
|
7 | 8 | # Device 📱 |
8 | 9 | Retrieves information about the host device, such as its **`type`** (*iPhone, iPad, TV, watch*), **`OS version`**, **`orientation`** (*landscape, portrait*), screen size, etc. |
@@ -104,14 +105,25 @@ Use Xcode's [built-in support for SPM](https://developer.apple.com/documentation |
104 | 105 | In your `Package.swift`, add `Device` as a dependency: |
105 | 106 | ```swift |
106 | 107 | dependencies: [ |
107 | | - .package(url: "https://github.com/backslash-f/device", from: "1.0.0") |
108 | | -], |
| 108 | + .package( |
| 109 | + url: "https://github.com/thatfactory/device", |
| 110 | + from: "0.1.0" |
| 111 | + ) |
| 112 | +] |
109 | 113 | ``` |
110 | 114 |
|
111 | 115 | Associate the dependency with your target: |
112 | 116 | ```swift |
113 | 117 | targets: [ |
114 | | - .target(name: "App", dependencies: ["Device"]) |
| 118 | + .target( |
| 119 | + name: "YourTarget", |
| 120 | + dependencies: [ |
| 121 | + .product( |
| 122 | + name: "Device", |
| 123 | + package: "device" |
| 124 | + ) |
| 125 | + ] |
| 126 | + ) |
115 | 127 | ] |
116 | 128 | ``` |
117 | 129 |
|
|
0 commit comments