{"id":20604878,"url":"https://github.com/allaboutapps/debugview-ios","last_synced_at":"2025-08-12T12:33:35.594Z","repository":{"id":217719579,"uuid":"744004934","full_name":"allaboutapps/debugview-ios","owner":"allaboutapps","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-18T10:23:25.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-13T18:38:04.537Z","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/allaboutapps.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}},"created_at":"2024-01-16T12:51:21.000Z","updated_at":"2024-01-18T10:16:41.000Z","dependencies_parsed_at":"2024-01-18T02:32:13.362Z","dependency_job_id":"58b5f84e-1140-4372-9a69-e5e13f059538","html_url":"https://github.com/allaboutapps/debugview-ios","commit_stats":null,"previous_names":["allaboutapps/debugview-ios"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/allaboutapps/debugview-ios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2Fdebugview-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2Fdebugview-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2Fdebugview-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2Fdebugview-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allaboutapps","download_url":"https://codeload.github.com/allaboutapps/debugview-ios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allaboutapps%2Fdebugview-ios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270061217,"owners_count":24520263,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-16T09:25:24.343Z","updated_at":"2025-08-12T12:33:35.573Z","avatar_url":"https://github.com/allaboutapps.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Debug View iOS\n\nThe Debug Package lets you easily add values meant for debugging purposes and showing them anywhere in your app.\n\n## Getting Started\n\n`DebugController` is used to add and store values meant for debugging purposes and `DebugScreen` (SwiftUI) or if you are using UIKit based apps, just wrap it in a `UIHostingController`, is used for displaying them.\n\n## Creating Items\n### Values\n\nTo create static or dynamic values (either `String` or your own Type which conforms to `CustomDebugStringConvertible` or `CustomStringConvertible`), use either of the initializers of the `DebugValue` struct.\n\n#### Static Values\n\n```swift\nDebugValue(\n    id: \"staticValue\",\n    label: \"Static Value\",\n    staticValue: \"Your static value\"\n)\n```\n\u003e ###### Notes\n\u003e Static values are evaluated when the `DebugValue` is instantiated.\n\n#### Dynamic Values\n\n```swift\nDebugValue(\n    id: \"dynamicValueAutoClosure\",\n    label: \"Dynamic Value Auto Closure\",\n    value: String(Int.random(in: 1 ... 6))\n)\n```\n\nor:\n\n```swift\nDebugValue(\n    id: \"dynamicValueClosure\",\n    label: \"Dynamic Value Closure\",\n    value: {\n        String(Int.random(in: 1 ... 6))\n    }\n)\n```\n\n\u003e ###### Notes\n\u003e Dynamic values are wrapped in a closure with `@autoclosure` or your own closure, and evaluated when the `DebugScreen` is shown. Every time the `DebugScreen` is shown again, values are re-evaluated.\n\n### Buttons\n\nTo create buttons which perform a custom action, use the `DebugButton` struct.\n\n```swift\nDebugButton(\n    id: \"button\",\n    label: \"The button label\",\n    action: {\n        // your custom action\n    }\n)\n```\n\n#### Notes\n\u003e Make sure that your `DebugValue` or `DebugButton`s `id`s are unique, as they are used for diffing and identifying the item.\n\n## Sections\n\nItems are grouped by sections, making the information easier to read. Items are added to sections when inserting them into the `DebugController`.\n\n```swift\nDebugSection(\n    id: \"app\",\n    label: \"App\"\n)\n```\n\n\u003e ###### Notes\n\u003e Make sure that your `id`s are unique, as they are used for diffing and identifying the section.\n\n## Adding Items\n\nAdd items to the `DebugController` by calling either of these functions:\n\n- `addButton(_ button: DebugButton, toSection section: DebugSection)`\n- `addValue(_ value: DebugValue, toSection section: DebugSection)`\n\n\u003e ###### Notes\n\u003e - Adding item with the same `id` twice will override the item in the `DebugController`s store.\n\u003e - Only items added with any of the above-mentioned methods are shown in the `DebugScreen`.\n\u003e - Sections and Values are ordered by time of insert. This means they will appear in the order they were added to the `DebugController`.\n\n## Showing the Debug Screen\n\nFor SwiftUI based apps:\n\n```swift\nDebugScreen(\n    controller: debugController,\n    appearance: debugAppearance\n)\n\n```\n\nFor UIKit based apps, wrap the `DebugScreen` in a `UIHostingController`.\n\n### Debug Screen Appearance\nThe `DebugScreen`s appearance can be configured via the `DebugScreenAppearance` struct.\n\n```DebugScreenAppearance(tintColor: .red)```\n\n## Defaults\n\nThe following `DebugValue`s exist by default:\n\n```swift\npublic extension DebugValue {\n    static let appVersion = DebugValue(\n        id: \"appVersion\",\n        label: \"Version\",\n        value: Bundle.main.infoDictionary?[\"CFBundleShortVersionString\"] as? String\n    )\n    \n    static let appBuildNumber = DebugValue(\n        id: \"appBuildNumber\",\n        label: \"Build Number\",\n        value: Bundle.main.infoDictionary?[\"CFBundleVersion\"] as? String\n    )\n    \n    static let appBundleId = DebugValue(\n        id: \"bundleId\",\n        label: \"Bundle Identifier\",\n        value: Bundle.main.bundleIdentifier\n    )\n    \n    static let userLocale = DebugValue(\n        id: \"locale\",\n        label: \"Locale\",\n        value: Locale.autoupdatingCurrent.identifier\n    )\n    \n    static let deviceOSVersion = DebugValue(\n        id: \"deviceOSVersion\",\n        label: \"OS Version\",\n        value: \"\\(UIDevice.current.systemName) \\(UIDevice.current.systemVersion)\"\n    )\n    \n    static let deviceOSModel = DebugValue(\n        id: \"deviceOSModel\",\n        label: \"Model\",\n        value: UIDevice.current.model\n    )\n    \n    static let pushNotificationsRegistered = DebugValue(\n        id: \"pushNotificationsRegistered\",\n        label: \"Push Notifications registered\",\n        value: UIApplication.shared.isRegisteredForRemoteNotifications\n    )\n}\n```\n\nThe following `DebugSection`s exist by default:\n\n```swift\npublic extension DebugSection {\n    static let app = DebugSection(id: \"app\", label: \"App\")\n    static let user = DebugSection(id: \"user\", label: \"User\")\n    static let device = DebugSection(id: \"device\", label: \"Device\")\n    static let pushNotifications = DebugSection(id: \"pushNotifications\", label: \"Push Notifications\")\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallaboutapps%2Fdebugview-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallaboutapps%2Fdebugview-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallaboutapps%2Fdebugview-ios/lists"}