{"id":23070236,"url":"https://github.com/markbattistella/platformchecker","last_synced_at":"2026-05-03T16:31:26.722Z","repository":{"id":239115029,"uuid":"798577094","full_name":"markbattistella/PlatformChecker","owner":"markbattistella","description":"PlatformKit provides easy-to-use Swift properties for checking device and OS environments across Apple platforms. Ideal for tailoring app behavior in iOS, macOS, tvOS, watchOS, and visionOS.","archived":false,"fork":false,"pushed_at":"2026-02-20T03:06:34.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-20T07:12:52.260Z","etag":null,"topics":["appkit","catalyst","hacktoberfest","ios","ipados","macos","macos-catalyst","simulator","swift","swiftui","tvos","uikit","utility","visionos","watchos"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/markbattistella/PlatformChecker/documentation","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markbattistella.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["markbattistella"],"custom":["https://www.paypal.me/markbattistella/5AUD","https://www.paypal.me/markbattistella/10AUD","https://www.paypal.me/markbattistella/20AUD"]}},"created_at":"2024-05-10T03:54:18.000Z","updated_at":"2026-02-20T03:06:37.000Z","dependencies_parsed_at":"2024-05-10T05:24:18.452Z","dependency_job_id":"13b0732e-55ec-45d7-9b28-14d6f2e74497","html_url":"https://github.com/markbattistella/PlatformChecker","commit_stats":null,"previous_names":["markbattistella/platformchecker"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/markbattistella/PlatformChecker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2FPlatformChecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2FPlatformChecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2FPlatformChecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2FPlatformChecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbattistella","download_url":"https://codeload.github.com/markbattistella/PlatformChecker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbattistella%2FPlatformChecker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32577119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appkit","catalyst","hacktoberfest","ios","ipados","macos","macos-catalyst","simulator","swift","swiftui","tvos","uikit","utility","visionos","watchos"],"created_at":"2024-12-16T06:25:24.537Z","updated_at":"2026-05-03T16:31:26.705Z","avatar_url":"https://github.com/markbattistella.png","language":"Swift","funding_links":["https://github.com/sponsors/markbattistella","https://www.paypal.me/markbattistella/5AUD","https://www.paypal.me/markbattistella/10AUD","https://www.paypal.me/markbattistella/20AUD"],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 MD041 --\u003e\n\u003cdiv align=\"center\"\u003e\n\n# PlatformChecker\n\n![Swift Versions](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmarkbattistella%2FPlatformChecker%2Fbadge%3Ftype%3Dswift-versions)\n\n![Platforms](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fmarkbattistella%2FPlatformChecker%2Fbadge%3Ftype%3Dplatforms)\n\n![Licence](https://img.shields.io/badge/Licence-MIT-white?labelColor=blue\u0026style=flat)\n\n\u003c/div\u003e\n\n**PlatformChecker** provides a structured and intuitive way to access environment-specific checks across different Apple platforms. It is designed to facilitate the integration of platform-specific functionalities in cross-platform Swift projects.\n\n## Features\n\n- **Platform Checks:** Quickly determine which Apple platform your application is currently running on (iOS, macOS, watchOS, tvOS, visionOS).\n- **Device Checks:** Easily identify device types such as iPhone, iPad, and Vision devices.\n- **Environment Checks:** Check if your app is running as a Mac Catalyst app, in a simulator, or through TestFlight, and whether it's in debug mode.\n\n## Installation\n\n### Swift Package Manager\n\nYou can add PlatformChecker to your project via Swift Package Manager. Add the following dependency to your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(\n        url: \"https://github.com/markbattistella/PlatformChecker.git\",\n         from: \"1.0.0\"\n    )\n]\n```\n\n## Usage\n\nImport PlatformChecker in the Swift file where you want to use the platform and device checks:\n\n```swift\nimport PlatformChecker\n```\n\n### Example Usage\n\nHere are some examples of how you can use PlatformChecker in your project:\n\n```swift\nif Platform.isiOS {\n    print(\"Running on iOS\")\n}\n\nif Platform.isiPhone {\n    print(\"Device is an iPhone\")\n}\n\nif Platform.isDebugMode {\n    print(\"Debug mode is enabled\")\n}\n```\n\nThese checks can be used to conditionally apply logic or configurations based on the operating system, device type, or runtime environment.\n\n## Properties\n\n| Property           | Description                                                               |\n|--------------------|---------------------------------------------------------------------------|\n| `Platform.isiOS`   | Returns `true` if running on iOS, excluding Mac Catalyst apps.            |\n| `Platform.isTVOS`  | Returns `true` if running on tvOS.                                        |\n| `Platform.isMacOS` | Returns `true` if running on macOS, excluding Mac Catalyst apps.          |\n| `Platform.isWatchOS`| Returns `true` if running on watchOS.                                     |\n| `Platform.isVisionOS`| Returns `true` if running on visionOS, specific to Apple's Vision Pro devices. |\n| `Platform.isiPhone`| Returns `true` if the device is an iPhone, excluding Mac Catalyst.        |\n| `Platform.isiPad`  | Returns `true` if the device is an iPad, excluding Mac Catalyst.          |\n| `Platform.isTV`    | Returns `true` if the device is identified as a TV.                       |\n| `Platform.isVisionDevice`| Returns `true` if the device is a Vision device, specific to visionOS.  |\n| `Platform.isMacCatalyst`| Returns `true` if the app is running as a Mac Catalyst app.              |\n| `Platform.isSimulator`| Returns `true` if the app is running in a simulator.                      |\n| `Platform.isDebugMode`| Returns `true` if the current build configuration is set for debugging.   |\n| `Platform.isTestFlight`| Returns `true` if the app is running through TestFlight.                 |\n\n## Documentation\n\nEach property in the Platform struct is documented with inline comments that explain what the property checks and its intended use case.\n\n## Contributing\n\nContributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request.\n\n## License\n\nPlatformChecker is released under the MIT license. See [LICENSE](https://raw.githubusercontent.com/markbattistella/PlatformChecker/main/LICENCE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbattistella%2Fplatformchecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbattistella%2Fplatformchecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbattistella%2Fplatformchecker/lists"}