{"id":3094,"url":"https://github.com/socketio/socket.io-client-swift","last_synced_at":"2025-05-13T20:18:28.500Z","repository":{"id":28118430,"uuid":"31617364","full_name":"socketio/socket.io-client-swift","owner":"socketio","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-01T16:33:03.000Z","size":3369,"stargazers_count":5259,"open_issues_count":256,"forks_count":844,"subscribers_count":135,"default_branch":"master","last_synced_at":"2025-05-06T05:42:05.280Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/socketio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-03-03T19:39:35.000Z","updated_at":"2025-04-29T15:29:25.000Z","dependencies_parsed_at":"2024-11-19T04:58:05.656Z","dependency_job_id":null,"html_url":"https://github.com/socketio/socket.io-client-swift","commit_stats":{"total_commits":1456,"total_committers":50,"mean_commits":29.12,"dds":"0.13186813186813184","last_synced_commit":"175da8b5156f6b132436f0676cc84c2f6a766b6e"},"previous_names":[],"tags_count":161,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketio%2Fsocket.io-client-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketio%2Fsocket.io-client-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketio%2Fsocket.io-client-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socketio%2Fsocket.io-client-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socketio","download_url":"https://codeload.github.com/socketio/socket.io-client-swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253859659,"owners_count":21975149,"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-01-05T20:16:31.214Z","updated_at":"2025-05-13T20:18:28.481Z","avatar_url":"https://github.com/socketio.png","language":"Swift","funding_links":[],"categories":["WebSocket","Libs","Swift","HarmonyOS","Socket","Network [🔝](#readme)","iOS"],"sub_categories":["Web View","Network","Other free courses","Windows Manager","Socket"],"readme":"[![Build Status](https://travis-ci.org/socketio/socket.io-client-swift.svg?branch=master)](https://travis-ci.org/socketio/socket.io-client-swift)\n\n# Socket.IO-Client-Swift\nSocket.IO-client for iOS/OS X.\n\n## Example\n```swift\nimport SocketIO\n\nlet manager = SocketManager(socketURL: URL(string: \"http://localhost:8080\")!, config: [.log(true), .compress])\nlet socket = manager.defaultSocket\n\nsocket.on(clientEvent: .connect) {data, ack in\n    print(\"socket connected\")\n}\n\nsocket.on(\"currentAmount\") {data, ack in\n    guard let cur = data[0] as? Double else { return }\n    \n    socket.emitWithAck(\"canUpdate\", cur).timingOut(after: 0) {data in\n        if data.first as? String ?? \"passed\" == SocketAckStatus.noAck {\n            // Handle ack timeout \n        }\n\n        socket.emit(\"update\", [\"amount\": cur + 2.50])\n    }\n\n    ack.with(\"Got your currentAmount\", \"dude\")\n}\n\nsocket.connect()\n```\n\n## Features\n- Supports Socket.IO server 2.0+/3.0+/4.0+ (see the [compatibility table](https://nuclearace.github.io/Socket.IO-Client-Swift/Compatibility.html))\n- Supports Binary\n- Supports Polling and WebSockets\n- Supports TLS/SSL\n\n## FAQS\nCheckout the [FAQs](https://nuclearace.github.io/Socket.IO-Client-Swift/faq.html) for commonly asked questions.\n\n\nCheckout the [12to13](https://nuclearace.github.io/Socket.IO-Client-Swift/12to13.html) guide for migrating to v13+ from v12 below.\n\nCheckout the [15to16](https://nuclearace.github.io/Socket.IO-Client-Swift/15to16.html) guide for migrating to v16+ from v15.\n\n## Installation\nRequires Swift 4/5 and Xcode 10.x\n\n### Swift Package Manager\nAdd the project as a dependency to your Package.swift:\n```swift\n// swift-tools-version:4.2\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"socket.io-test\",\n    products: [\n        .executable(name: \"socket.io-test\", targets: [\"YourTargetName\"])\n    ],\n    dependencies: [\n        .package(url: \"https://github.com/socketio/socket.io-client-swift\", .upToNextMinor(from: \"16.1.1\"))\n    ],\n    targets: [\n        .target(name: \"YourTargetName\", dependencies: [\"SocketIO\"], path: \"./Path/To/Your/Sources\")\n    ]\n)\n```\n\nThen import `import SocketIO`.\n\n### Carthage\nAdd this line to your `Cartfile`:\n```\ngithub \"socketio/socket.io-client-swift\" ~\u003e 16.1.1\n```\n\nRun `carthage update --platform ios,macosx`.\n\nAdd the `Starscream` and `SocketIO` frameworks to your projects and follow the usual Carthage process.\n\n### CocoaPods 1.0.0 or later\nCreate `Podfile` and add `pod 'Socket.IO-Client-Swift'`:\n\n```ruby\nuse_frameworks!\n\ntarget 'YourApp' do\n    pod 'Socket.IO-Client-Swift', '~\u003e 16.1.1'\nend\n```\n\nInstall pods:\n\n```\n$ pod install\n```\n\nImport the module:\n\nSwift:\n```swift\nimport SocketIO\n```\n\nObjective-C:\n\n```Objective-C\n@import SocketIO;\n```\n\n\n# [Docs](https://nuclearace.github.io/Socket.IO-Client-Swift/index.html)\n\n- [Client](https://nuclearace.github.io/Socket.IO-Client-Swift/Classes/SocketIOClient.html)\n- [Manager](https://nuclearace.github.io/Socket.IO-Client-Swift/Classes/SocketManager.html)\n- [Engine](https://nuclearace.github.io/Socket.IO-Client-Swift/Classes/SocketEngine.html)\n- [Options](https://nuclearace.github.io/Socket.IO-Client-Swift/Enums/SocketIOClientOption.html)\n\n## Detailed Example\nA more detailed example can be found [here](https://github.com/nuclearace/socket.io-client-swift-example)\n\nAn example using the Swift Package Manager can be found [here](https://github.com/nuclearace/socket.io-client-swift-spm-example)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketio%2Fsocket.io-client-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketio%2Fsocket.io-client-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketio%2Fsocket.io-client-swift/lists"}