{"id":25390521,"url":"https://github.com/vikill33/applewatchscreensize","last_synced_at":"2025-07-09T01:38:52.166Z","repository":{"id":186105940,"uuid":"674618801","full_name":"VIkill33/AppleWatchScreenSize","owner":"VIkill33","description":"Simply get Apple Watch's screen size and rounded corner size.","archived":false,"fork":false,"pushed_at":"2024-09-26T08:06:19.000Z","size":16,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T10:47:15.951Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VIkill33.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}},"created_at":"2023-08-04T11:35:55.000Z","updated_at":"2024-09-26T08:06:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"921cadf6-9407-41f1-a9d1-5efeaee198e1","html_url":"https://github.com/VIkill33/AppleWatchScreenSize","commit_stats":null,"previous_names":["vikill33/applewatchscreensize"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VIkill33/AppleWatchScreenSize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FAppleWatchScreenSize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FAppleWatchScreenSize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FAppleWatchScreenSize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FAppleWatchScreenSize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VIkill33","download_url":"https://codeload.github.com/VIkill33/AppleWatchScreenSize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VIkill33%2FAppleWatchScreenSize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264376495,"owners_count":23598548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-02-15T14:56:01.589Z","updated_at":"2025-07-09T01:38:52.144Z","avatar_url":"https://github.com/VIkill33.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AppleWatchScreenSize\n\nAn easy way to get screen size and rounded corner size of Apple Watch.\n\n# Installation\nRequire watchOS 4 or higher.\nIn Xcode go to `File -\u003e Swift Packages -\u003e Add Package Dependency` \nand paste in the repo's url: \n\n`https://github.com/VIkill33/AppleWatchScreenSize.git`\n\nOr you can download the code of this repo, then `Add Local...` in Xcode, and open the folder of the repo.\n\n# Usage\n- Import this package after you installed by `import AppleWatchScreenSize`\n- This repo define a public struct called ScreenSize containing 3 vars called width, height and a computed var cornerSize. You can easily know what they mean from their name(Note all vars were measured as **px**). So the demo code would be like:\n```swift\nimport SwiftUI\nimport AppleWatchScreenSize\n\nstruct ContentView: View {\n    let screenSize = ScreenSize()\n    \n    var body: some View {\n        RoundedRectangle(cornerSize: CGSize(width: Double(screenSize.cornerSize ?? 0), height: Double(screenSize.cornerSize ?? 0)))\n            .stroke(lineWidth: 10.0)\n            .foregroundColor(.red)\n            .edgesIgnoringSafeArea(.all)\n    }\n}\n```\nThe preview will be like:\n\n\u003cimg width=\"224\" alt=\"image\" src=\"https://github.com/VIkill33/AppleWatchScreenSize/assets/78488529/4bc020e9-1477-408e-b01f-226268728e9d\"\u003e\n\n# How does it work\nThe data comes from https://screensizes.app/?compare=applewatch.\nSince Apple Watch with same resolution share the same rounded corner size, it's not hard to infer the corner size from given screen size. Before series 3 Apple Watch just have a rectangle screen, so the corner size of them will return **nil** instead.\n\nIt can't be denied that Apple may someday release a new watch with same resolution but different corner size, but it works fine by now ;)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikill33%2Fapplewatchscreensize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikill33%2Fapplewatchscreensize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikill33%2Fapplewatchscreensize/lists"}