{"id":22192559,"url":"https://github.com/3sidedcube/baymax","last_synced_at":"2025-07-26T22:32:11.107Z","repository":{"id":46915872,"uuid":"158536293","full_name":"3sidedcube/Baymax","owner":"3sidedcube","description":"A diagnostics framework for iOS apps","archived":false,"fork":false,"pushed_at":"2024-09-05T09:43:03.000Z","size":682,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-10T15:06:55.408Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3sidedcube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-21T11:15:33.000Z","updated_at":"2024-05-28T19:43:36.000Z","dependencies_parsed_at":"2022-09-10T06:10:22.324Z","dependency_job_id":null,"html_url":"https://github.com/3sidedcube/Baymax","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FBaymax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FBaymax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FBaymax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2FBaymax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3sidedcube","download_url":"https://codeload.github.com/3sidedcube/Baymax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227726359,"owners_count":17810452,"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":"2024-12-02T12:26:03.273Z","updated_at":"2024-12-02T12:26:04.004Z","avatar_url":"https://github.com/3sidedcube.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Baymax\n\n[![Build Status](https://travis-ci.org/3sidedcube/Baymax.svg)](https://travis-ci.org/3sidedcube/Baymax) [![Swift 5.5](http://img.shields.io/badge/swift-5.5-brightgreen.svg)](https://swift.org/blog/swift-5-5-released/) [![Apache 2](https://img.shields.io/badge/license-GNU%20General%20Public%20License%20v3.0-brightgreen.svg)](LICENSE.md)\n\nBaymax is a diagnostics tool for iOS apps which allows you and 3rd party frameworks to provide diagnostics via a shared interface.\n\n# Installation\n\n## Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is the our suggested method for including Baymax into your iOS project or framework. Carthage is a package manager which either builds projects and provides you with binaries or uses pre-built frameworks from release tags in GitHub. To add Baymax to your project, simply specify it in your `Cartfile`:\n\n```ogdl\ngithub \"3sidedcube/Baymax\" ~\u003e 2.0.0\n```\n\nWe recommend that you build with `xcframework`s:\n```bash\ncarthage update --platform ios --use-xcframeworks\n```\n\n# Usage\n\n## Attaching Baymax to your window\n\nBaymax must be attached to your app window in order to display UI when the user performs (currently) a 4 finger swipe upwards on the device:\n\n```swift\nDiagnosticsManager.shared.attach(to: myWindow)\n```\n\nthe function accepts a window object, and an optional closure which can be used to provide a login mechanism for accessing Baymax's UI for the case where you might not want users to be able to access your diagnostics tools.\n\n## Registering a set of diagnostic tools\n\n### `DiagnosticServiceProvider` protocol\n\nTo register yourself as a diagnostics provider, you need to conform to the\n`DiagnosticsServiceProvider` and then call:\n\n```swift\nDiagnosticsManager.sharedInstance.register(provider: myProvider)\n```\n\n`DiagnosticsServiceProvider` is a simple protocol which requires only two properties to be implemented:\n\n#### `serviceName` (String)\n\nThis provides the readable name which will be displayed at the root level of Baymax's UI. It should represent your tool fairly so users know what each provider in baymax provides for them.\n\n#### `diagnosticsTools` (Array\\\u003cDiagnosticTool\\\u003e)\n\nThis provides an array of tools, which will be rendered for selection when the user clicks the entry in the main UI for your service provider.\n\n### `DiagnosticTool` protocol\n\n`DiagnosticTool` is also a simple protocol with one property, and one function that need implementing:\n\n#### `displayName` (String)\n\nThis provides the readable name that will be displayed in Baymax's UI once the user has clicked into your provider.\n\n#### `launchUI` (Function)\n\n`func launchUI(in navigationController: UINavigationController)`\n\n`launchUI` function gets passed the current navigation controller that Baymax is using for it's UI, allowing you to push/present whatever UI you would like for your tool. This is called when the user clicks the table cell for an individual tool. \n\n## Logging\n\nBaymax provides an alternative to Apple's `os_log` function, which will save logs to the user's documents directory, they will also be viewable using the Logs tool provided by default by baymax. The logger can be used like so:\n\n```swift\nbaymax_log(\"App Launch\", category: \"App Lifecycle\", type: .debug)\n```\nthe function also supports providing a `subsystem` like the `os_log` function. This function will NOT also write to `os_log` so you should make sure you are still logging there if you want to utilise Apple's logging tools.\n\n## Default Tools\n\n### Logging\n\nThe logging tool allows you to view, share and delete logs created by calling `baymax_log` or manually using a `Logger` object.\n\n### Property List Viewer\n\nThe property list viewer allows you to view the contents of your app's Info.plist!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Fbaymax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3sidedcube%2Fbaymax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Fbaymax/lists"}