{"id":19783830,"url":"https://github.com/magicien/joyconswift","last_synced_at":"2025-04-30T22:31:43.795Z","repository":{"id":45128575,"uuid":"196611621","full_name":"magicien/JoyConSwift","owner":"magicien","description":"IOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)","archived":false,"fork":false,"pushed_at":"2023-04-04T10:53:08.000Z","size":138,"stargazers_count":52,"open_issues_count":1,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T09:44:18.620Z","etag":null,"topics":["gamepad","iokit","joy-con","macos","nintendo-switch","pro-controller","swift"],"latest_commit_sha":null,"homepage":null,"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/magicien.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-12T16:30:56.000Z","updated_at":"2024-10-11T16:20:28.000Z","dependencies_parsed_at":"2024-11-12T06:09:25.114Z","dependency_job_id":"96bf5ed2-7ee1-4281-89a9-f151338dbd11","html_url":"https://github.com/magicien/JoyConSwift","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"73497ff2a448726ea22deb6ef08e6fc4a57c358f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FJoyConSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FJoyConSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FJoyConSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicien%2FJoyConSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicien","download_url":"https://codeload.github.com/magicien/JoyConSwift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251791647,"owners_count":21644436,"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":["gamepad","iokit","joy-con","macos","nintendo-switch","pro-controller","swift"],"created_at":"2024-11-12T06:09:22.024Z","updated_at":"2025-04-30T22:31:43.315Z","avatar_url":"https://github.com/magicien.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JoyConSwift\nIOKit wrapper for Nintendo Joy-Con and ProController (macOS, Swift)\n\n## Installation\n\n### Using [CocoaPods](http://cocoapods.org/)\n\nAdd the following to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html):\n\n```rb\npod 'JoyConSwift'\n```\n\n## Set USB Capability\n\nTo use controllers, you need to check `Signing \u0026 Capabilities` \u003e `App SandBox` \u003e `USB` in your Xcode project.\n\n\u003cimg width=\"367\" alt=\"usb_capability\" src=\"https://user-images.githubusercontent.com/1047810/82137704-5f7ea980-9855-11ea-8f21-0e6c2ad518e9.png\"\u003e\n\n## Usage\n\n```swift\nimport JoyConSwift\n\n// Initialize the manager\nlet manager = JoyConManager()\n\n// Set connection event callbacks\nmanager.connectHandler = { controller in\n    // Do something with the controller\n    controller.setPlayerLights(l1: .on, l2: .off, l3: .off, l4: .off)\n    controller.enableIMU(enable: true)\n    controller.setInputMode(mode: .standardFull)\n    controller.buttonPressHandler = { button in\n        if button == .A {\n            // Do something with the A button\n        }\n    }\n}\nmanager.disconnectHandler = { controller in\n    // Clean the controller data\n}\n\n// Start waiting for the connection events\nmanager.runAsync()\n```\n\n## Documentation\n\nSee [JoyConSwift Documentation](https://magicien.github.io/JoyConSwift/)\n\n## Thanks to\n\n[dekuNukem/Nintendo_Switch_Reverse_Engineering](https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering) - A look at inner workings of Joycon and Nintendo Switch\n\n## See also\n\n[JoyKeyMapper](https://github.com/magicien/JoyKeyMapper) - Nintendo Joy-Con/ProController Key mapper for macOS\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicien%2Fjoyconswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicien%2Fjoyconswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicien%2Fjoyconswift/lists"}