nuclearace / Socket.io Client Swift
Licence: other
socket.io-client for Swift
Stars: ✭ 352
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Socket.io Client Swift
onchat-web
A simple, beautiful, mobile-first instant messaging progressive web application.
Stars: ✭ 138 (-60.8%)
Mutual labels: socketio
codeplayer
An online judge system for competitive programming platform, The website is hosted on http://codeplayer.co.in
Stars: ✭ 12 (-96.59%)
Mutual labels: socketio
bubbly
Full stack chat application created w/ Next.js, Socket.IO, Express, React and TypeScript
Stars: ✭ 24 (-93.18%)
Mutual labels: socketio
Socket.io Chat Fargate
A demo application showing how to deploy a scalable realtime chat application powered by Socket.io, Node.js, Docker, and AWS Fargate, and deployed using a CI/CD pipeline powered by AWS CodePipeline
Stars: ✭ 312 (-11.36%)
Mutual labels: socketio
react-flask-socketio
This is a base code for testing websocket connection between python flask with socketio as Server and react Webapp as client
Stars: ✭ 26 (-92.61%)
Mutual labels: socketio
multipiano
A vuejs application which allow users to play piano with friends!
Stars: ✭ 33 (-90.62%)
Mutual labels: socketio
hare
🐇 CLI tool for websockets and easy to use Golang package
Stars: ✭ 40 (-88.64%)
Mutual labels: socketio
fao
Party game based on Oink Games' tabletop game, "A Fake Artist Goes to New York." Draw with your phone or a mouse.
Stars: ✭ 70 (-80.11%)
Mutual labels: socketio
chat-server
A simple chat server using Flask, SocketIO and ReactJS.
Stars: ✭ 15 (-95.74%)
Mutual labels: socketio
Tweet-Locator
Tweet locator using ExpressJS, React and Twitter API
Stars: ✭ 109 (-69.03%)
Mutual labels: socketio
Wilearning
Multiparty meeting&e-learning using mediasoup, webrtc ,angular and ionic with powerful whiteboard support
Stars: ✭ 280 (-20.45%)
Mutual labels: socketio
socketio-shared-webworker
Socket.io client inside a WebWorker thread
Stars: ✭ 85 (-75.85%)
Mutual labels: socketio
chatbot
🤖️ 基于 PyTorch 的任务型聊天机器人(支持私有部署和 docker 部署的 Chatbot)
Stars: ✭ 77 (-78.12%)
Mutual labels: socketio
Docker Chat Demo
Companion repo for my "Lessons from Building a Node App in Docker" article.
Stars: ✭ 320 (-9.09%)
Mutual labels: socketio
Instaclone
An instagram clone created with the MERN stack
Stars: ✭ 289 (-17.9%)
Mutual labels: socketio
nchat
The third edition of nodejs-chat. Mobile edition with rest api. Support token authentication.
Stars: ✭ 82 (-76.7%)
Mutual labels: socketio
Socket.IO-Client-Swift
Socket.IO-client for iOS/OS X.
Example
import SocketIO
let manager = SocketManager(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .compress])
let socket = manager.defaultSocket
socket.on(clientEvent: .connect) {data, ack in
print("socket connected")
}
socket.on("currentAmount") {data, ack in
guard let cur = data[0] as? Double else { return }
socket.emitWithAck("canUpdate", cur).timingOut(after: 0) {data in
if data.first as? String ?? "passed" == SocketAckValue.noAck {
// Handle ack timeout
}
socket.emit("update", ["amount": cur + 2.50])
}
ack.with("Got your currentAmount", "dude")
}
socket.connect()
Features
- Supports socket.io 2.0+/3.0+.
- Supports Binary
- Supports Polling and WebSockets
- Supports TLS/SSL
FAQS
Checkout the FAQs for commonly asked questions.
Checkout the 12to13 guide for migrating to v13+ from v12 below.
Checkout the 15to16 guide for migrating to v16+ from v15.
Installation
Requires Swift 4/5 and Xcode 10.x
Swift Package Manager
Add the project as a dependency to your Package.swift:
// swift-tools-version:4.2
import PackageDescription
let package = Package(
name: "socket.io-test",
products: [
.executable(name: "socket.io-test", targets: ["YourTargetName"])
],
dependencies: [
.package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMinor(from: "15.0.0"))
],
targets: [
.target(name: "YourTargetName", dependencies: ["SocketIO"], path: "./Path/To/Your/Sources")
]
)
Then import import SocketIO
.
Carthage
Add this line to your Cartfile
:
github "socketio/socket.io-client-swift" ~> 15.2.0
Run carthage update --platform ios,macosx
.
Add the Starscream
and SocketIO
frameworks to your projects and follow the usual Carthage process.
CocoaPods 1.0.0 or later
Create Podfile
and add pod 'Socket.IO-Client-Swift'
:
use_frameworks!
target 'YourApp' do
pod 'Socket.IO-Client-Swift', '~> 15.2.0'
end
Install pods:
$ pod install
Import the module:
Swift:
import SocketIO
Objective-C:
@import SocketIO;
Docs
Detailed Example
A more detailed example can be found here
An example using the Swift Package Manager can be found here
License
MIT
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].