{"id":32307699,"url":"https://github.com/homex-it/pusher-websocket-flutter","last_synced_at":"2025-10-23T07:22:18.579Z","repository":{"id":56837535,"uuid":"187902553","full_name":"HomeX-It/pusher-websocket-flutter","owner":"HomeX-It","description":"An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS","archived":true,"fork":false,"pushed_at":"2020-04-21T12:34:06.000Z","size":254,"stargazers_count":31,"open_issues_count":10,"forks_count":20,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-03-03T19:17:58.858Z","etag":null,"topics":["android","flutter","flutter-plugin","ios","push","pusher"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HomeX-It.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}},"created_at":"2019-05-21T19:41:36.000Z","updated_at":"2023-01-28T11:35:22.000Z","dependencies_parsed_at":"2022-09-09T23:20:17.702Z","dependency_job_id":null,"html_url":"https://github.com/HomeX-It/pusher-websocket-flutter","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/HomeX-It/pusher-websocket-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomeX-It%2Fpusher-websocket-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomeX-It%2Fpusher-websocket-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomeX-It%2Fpusher-websocket-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomeX-It%2Fpusher-websocket-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HomeX-It","download_url":"https://codeload.github.com/HomeX-It/pusher-websocket-flutter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HomeX-It%2Fpusher-websocket-flutter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280579386,"owners_count":26354525,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["android","flutter","flutter-plugin","ios","push","pusher"],"created_at":"2025-10-23T07:22:13.196Z","updated_at":"2025-10-23T07:22:18.556Z","avatar_url":"https://github.com/HomeX-It.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pusher Flutter Client\nAn unofficial Flutter plugin that wraps [pusher-websocket-java](https://github.com/pusher/pusher-websocket-java) on Android and [pusher-websocket-swift](https://github.com/pusher/pusher-websocket-swift) on iOS.\n\nGet it from [pub](https://pub.dev/packages/pusher_websocket_flutter).\n# How to install\n* Add to your pubspec.yaml\n```\ndependencies:\n  pusher_websocket_flutter: ^0.2.0\n```\n* In `/ios/Podfile`, set global platform to at least 9.0\n`platform :ios, '9.0'`\n### For iOS Objective-C based Flutter apps\nIt is currently a bit difficult to get some Swift based Flutter plugins working in an Objective-C based Flutter app. See [here for info](https://github.com/flutter/flutter/issues/25676) and [here for a way to fix](https://github.com/fayeed/flutter_freshchat/issues/9#issuecomment-514329934).\n\nThis set of steps should work to fix this for your project.\n* Add `use_frameworks!` to the end of the Runner section in `/ios/Podfile`\n* Set Swift version in your iOS Runner project.\n    * Open the project with Xcode.\n    * In Runner, File -\u003e New -\u003e File -\u003e Swift File. Name it anything.\n    * Xcode will ask you if you wish to create Bridging Header, click yes.\n    * Go to Runner `Build Settings` and set `SWIFT_VERSION` to either 4.2 or 5.0\n    * Delete the Swift file created in step 2\n    * Delete the Bridging Header created in step 3\n* `flutter clean`\n* In /ios `pod install --repo-update`\n\nIf you have trouble, try checking out the example_objc Flutter project.\n# How to use\n## Pusher.init( ... )\n|Parameter      |Type           |Description\t\t |\n|---------------|---------------|--------------------|\n|*appKey*       |`String`       |*Required* - The application key is a string which is globally unique to your application. It can be found in the API Access section of your application within the Channels user dashboard.|\n|*options*      |`PusherOptions`|*Required* - The options provided to pusher, more information in the *PusherOptions* section.|\n|*enableLogging*|`bool`         |*Optional* - Enabling this will activate the logging of important events to the console.|\n\n\n## Pusher.connect( ... )\n|Parameter                |Type                             |Description\t\t|\n|-------------------------|---------------------------------|-------------------|\n|*onConnectionStateChange*|`Function(ConnectionStateChange)`|*Optional* - Callback when the state of the connection changes (eg. `CONNECTING`, `CONNECTED`, `DISCONNECTED`, ... ).|\n|*onError*                |`Function(ConnectionError)`      |*Optional* - Callback when the connection fires an error (eg. `UnauthorizedException`).|\n\n## Pusher.subscribe( ... )\n|Parameter    |Type    |Description\t\t   |\n|-------------|--------|-------------------|\n|*channelName*|`String`|*Required* - provide the channel name to subscribe to (eg. `mychannel`, `private-mychannel` or `presence-mychannel`).|\n\n## Pusher.getSocketId()\nReturns the current socket ID, updated after a connection change\n\n## PusherOptions\n|Parameter        |Type         |Description\t\t|\n|-----------------|-------------|-------------------|\n|*auth*\t\t\t  |`PusherAuth` |*Optional* - A mechanism for authenticating a user's access to a channel at the point of subscription.|\n|*cluster*        |`String`     |*Optional* - The identifier of the cluster your application was created in. When not supplied, will connect to the `mt1`(`us-east-1`) cluster.|\n|*host*           |`String`     |*Optional* - Provide your own (websocket) host instead of the default `ws.pusherapp.com`|\n|*port*           |`int`        |*Optional* - Provide your own (websocket) port instead of the default `443` (when encryption is enabled) or port `80` (when encryption is disabled).|\n|*encrypted*      |`bool`       |*Optional* - Tell pusher to only connect over TLS connections to ensure connection traffic is encrypted. This means using `wss://` instead of `ws://`, encryption is enabled by default.|\n|*activityTimeout*|`int`        |*Optional* - After this time (in milliseconds) without any messages received from the server, a ping message will be sent to check if the connection is still working. Default value is supplied by the server, low values will result in unnecessary traffic. The default is set to `30000`.|\n\n## PusherAuth\n|Parameter  |Type                |Description\t\t |\n|-----------|--------------------|-------------------|\n|*endpoint*\t|`String`            |*Required* - The endpoint pusher should query to make the post request (eg. https://api.example.com/broadcating/auth).|\n|*headers*\t|`Map\u003cString,String\u003e`|*Optional* - The headers that should be sent with the POST request to the above endpoint. 2 Different *Content-Types* are supported: `application/x-www-form-urlencoded` \u0026 `application/json`. Supplying any of the above types will result into the request body being sent in `form-urlencoded` format or `JSON` format. Defaults to `{'Content-Type': 'application/x-www-form-urlencoded'}`|\n\n  \n## Development\nThis project uses code generation. Run after changing models in the project.\n \n`flutter packages pub run build_runner build --delete-conflicting-outputs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomex-it%2Fpusher-websocket-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhomex-it%2Fpusher-websocket-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhomex-it%2Fpusher-websocket-flutter/lists"}