Latest 0.0.3
License MIT
Platforms ios 9.0
Authors ,

Laravel Echo IOS

This is a project by Bubbleflat : find your perfect roommate and flatsharing

This project is wrapper to use Laravel Echo in Swift IOS project

This only work for, NOT FOR PUSHER yet !


This module can be imported with CocoaPods

pod 'LaravelEchoIOS'


First, you need to import the framework :

import LaravelEchoIOS

Then you can use it like in javascript ( but you need to wait for the socket to be connected )

let token = "Auth token"
let e : Echo = Echo(options: ["host":"http://localhost:6001", "auth": ["headers": ["Authorization": "Bearer " + token]]])

e.connected(){ data, ack in


    e.join(channel: "conversation.243").listen(event: ".NewMessage", callback: { data, ack in





See full Echo documentation for all available methods

All callback must been use like this :

e.connected(){ data, ack in

  // Do something when call


Or with a function like this

func listener(data: [Any], ack: SocketAckEmitter)

here, joining, leaving are not available yet

Latest podspec

    "name": "LaravelEchoIOS",
    "version": "0.0.3",
    "summary": "A wrapper for Laravel Echo in Swift",
    "description": "A wrapper for Laravel Echo with in Swift by",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Valentin Vivies": "[email protected]",
        "bubbleflat": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.3"
    "platforms": {
        "ios": "9.0"
    "source_files": [
    "exclude_files": "",
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    "pushed_with_swift_version": "4.0",
    "subspecs": [
            "name": "Socket.IO-Client-Swift",
            "dependencies": {
                "Socket.IO-Client-Swift": []

Pin It on Pinterest

Share This