https://github.com/jaywcjlove/DeviceInfo
A simple library that provides device information for iOS/macOS apps
https://github.com/jaywcjlove/DeviceInfo
ios macos swift swift-package swift-package-manager swiftui
Last synced: 8 days ago
JSON representation
A simple library that provides device information for iOS/macOS apps
- Host: GitHub
- URL: https://github.com/jaywcjlove/DeviceInfo
- Owner: jaywcjlove
- License: mit
- Created: 2024-10-01T19:38:20.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-23T06:01:52.000Z (3 months ago)
- Last Synced: 2026-04-23T08:08:12.803Z (3 months ago)
- Topics: ios, macos, swift, swift-package, swift-package-manager, swiftui
- Language: Swift
- Homepage:
- Size: 52.7 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-swift - DeviceInfo - Read device information in iOS and macOS apps. (Utilities and Extensions)
README
DeviceInfo
===
[](https://jaywcjlove.github.io/#/sponsor)
[](https://x.com/jaywcjlove)
A simple library that provides device information for iOS/macOS apps
Welcome to download [DevTutor](https://apps.apple.com/app/devtutor/id6471227008), a cheat sheet app designed to help developers quickly build excellent applications using SwiftUI.
```swift
import DeviceInfo
DeviceInfo.bundleName // e.g "DeviceInfoExample"
DeviceInfo.bundleIdentifier // e.g "com.wangchujiang.DeviceInfoExample"
DeviceInfo.bundleVersion // e.g "1"
DeviceInfo.systemVersionString // e.g "Version 15.0 (Build 24A335)"
DeviceInfo.isDarkMode // e.g `true`
DeviceInfo.version // e.g "1.3"
DeviceInfo.systemVersion.majorVersion // e.g "1"
DeviceInfo.systemVersion.minorVersion // e.g "3"
DeviceInfo.systemVersion.patchVersion // e.g "0"
DeviceInfo.systemMajorVersion // e.g "1"
DeviceInfo.systemMinorVersion // e.g "3"
DeviceInfo.systemPatchVersion // e.g "0"
DeviceInfo.appIcon // -> UIImage | NSImage
DeviceInfo.copyright // "Copyright © 2024 Chujiang Wang. All rights reserved."
DeviceInfo.appIsSandboxed // e.g `true`
```
## License
Licensed under the MIT License.