[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6833":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":8,"rankLanguage":8,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":8,"pushedAt":8,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":16,"lastSyncTime":26,"discoverSource":27},6833,"socket.io-client-swift","socketio\u002Fsocket.io-client-swift","socketio",null,"Swift",5297,869,127,244,0,1,2,39.82,"Other",false,"master",true,[],"2026-06-12 02:01:30","[![Build Status](https:\u002F\u002Ftravis-ci.org\u002Fsocketio\u002Fsocket.io-client-swift.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Fsocketio\u002Fsocket.io-client-swift)\n\n# Socket.IO-Client-Swift\nSocket.IO-client for iOS\u002FOS X.\n\n## Example\n```swift\nimport SocketIO\n\nlet manager = SocketManager(socketURL: URL(string: \"http:\u002F\u002Flocalhost: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            \u002F\u002F 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+\u002F3.0+\u002F4.0+ (see the [compatibility table](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002FCompatibility.html))\n- Supports Binary\n- Supports Polling and WebSockets\n- Supports TLS\u002FSSL\n\n## FAQS\nCheckout the [FAQs](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002Ffaq.html) for commonly asked questions.\n\n\nCheckout the [12to13](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002F12to13.html) guide for migrating to v13+ from v12 below.\n\nCheckout the [15to16](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002F15to16.html) guide for migrating to v16+ from v15.\n\n## Installation\nRequires Swift 4\u002F5 and Xcode 10.x\n\n### Swift Package Manager\nAdd the project as a dependency to your Package.swift:\n```swift\n\u002F\u002F 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:\u002F\u002Fgithub.com\u002Fsocketio\u002Fsocket.io-client-swift\", .upToNextMinor(from: \"16.1.1\"))\n    ],\n    targets: [\n        .target(name: \"YourTargetName\", dependencies: [\"SocketIO\"], path: \".\u002FPath\u002FTo\u002FYour\u002FSources\")\n    ]\n)\n```\n\nThen import `import SocketIO`.\n\n### Carthage\nAdd this line to your `Cartfile`:\n```\ngithub \"socketio\u002Fsocket.io-client-swift\" ~> 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', '~> 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:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002Findex.html)\n\n- [Client](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002FClasses\u002FSocketIOClient.html)\n- [Manager](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002FClasses\u002FSocketManager.html)\n- [Engine](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002FClasses\u002FSocketEngine.html)\n- [Options](https:\u002F\u002Fnuclearace.github.io\u002FSocket.IO-Client-Swift\u002FEnums\u002FSocketIOClientOption.html)\n\n## Detailed Example\nA more detailed example can be found [here](https:\u002F\u002Fgithub.com\u002Fnuclearace\u002Fsocket.io-client-swift-example)\n\nAn example using the Swift Package Manager can be found [here](https:\u002F\u002Fgithub.com\u002Fnuclearace\u002Fsocket.io-client-swift-spm-example)\n\n## License\nMIT\n","该项目是一个为iOS和macOS平台设计的Socket.IO客户端库，支持与Socket.IO服务器进行实时通信。它提供了包括连接管理、事件监听与触发、数据传输等功能，并且支持二进制数据传输、轮询及WebSocket协议，同时兼容TLS\u002FSSL安全连接。适用于需要实现即时通讯、在线游戏、直播互动等场景的应用开发。该库要求使用Swift 4\u002F5语言以及Xcode 10.x版本以上环境，可以通过Swift Package Manager、Carthage或CocoaPods方式集成到项目中。","2026-06-11 03:09:07","top_language"]