{"id":17651616,"url":"https://github.com/utmapp/cocoaspice","last_synced_at":"2025-04-16T14:40:58.850Z","repository":{"id":64949994,"uuid":"457110391","full_name":"utmapp/CocoaSpice","owner":"utmapp","description":"Cocoa bindings for SPICE client GTK","archived":false,"fork":false,"pushed_at":"2024-12-23T04:59:47.000Z","size":1285,"stargazers_count":33,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T05:23:37.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utmapp.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":"2022-02-08T21:30:53.000Z","updated_at":"2025-02-28T18:09:32.000Z","dependencies_parsed_at":"2024-01-18T03:50:53.538Z","dependency_job_id":"2679062a-d52f-4d8f-b316-f7c097b428ba","html_url":"https://github.com/utmapp/CocoaSpice","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utmapp%2FCocoaSpice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utmapp%2FCocoaSpice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utmapp%2FCocoaSpice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utmapp%2FCocoaSpice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utmapp","download_url":"https://codeload.github.com/utmapp/CocoaSpice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249250976,"owners_count":21237965,"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-10-23T11:42:48.925Z","updated_at":"2025-04-16T14:40:58.814Z","avatar_url":"https://github.com/utmapp.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CocoaSpice\n\nCocoaSpice brings native Cocoa bindings to [SPICE GTK][1] and is used to build SPICE clients for macOS and iOS.\n\n## Features\n\n* Renders displays and cursor into Metal textures\n* Support copy/paste through custom pasteboard binding\n* TCP socket connections and Unix socket file\n* Cursor and scroll-wheel channel\n* Take screenshot of current display\n* USB sharing and enumeration\n\n## Usage\n\n1. Add this repository to your project through Xcode: File -\u003e Add Packages...\n2. Link your target with: `libglib-2.0`, `libgstreamer-1.0`, `libusb-1.0` (optional), `libspice-client-glib-2.0`.\n3. Either add target `CocoaSpiceNoUsb` or `CocoaSpice` to your dependencies. \n\n### Start SPICE GTK\n\nYou must do this before using any other API. This starts a worker thread for SPICE GTK.\n\n```swift\nimport CocoaSwift\n\nguard CSMain.shared.spiceStart() else {\n    // handle worker failed to start\n    ...\n}\n\ndefer {\n    // use this to stop and clean up worker \n    CSMain.shared.spiceStop()\n}\n```\n\n### Open a connection\n\n`CSConnection` is the main interface to CocoaSpice. You can create a connection from TCP (shown below) or with a Unix socket file.\n\n```swift\nimport CocoaSwift\n\nlet connection = CSConnection(host: \"127.0.0.1\", port: \"4444\")\nconnection.delegate = yourConnectionDelegate;\nguard connection.connect() else {\n    // handle connection failed to be created\n    ...\n}\n```\n\nCocoaSpice follows the delegate model so connection events are handled through delegate methods. Implement the `CSConnectionDelegate` to be informed to SPICE client events.\n\n## Testing\n\nTODO: Implement testing\n\n[1]: https://gitlab.freedesktop.org/spice/spice-gtk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futmapp%2Fcocoaspice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futmapp%2Fcocoaspice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futmapp%2Fcocoaspice/lists"}