davidstump/SwiftPhoenixClient
Fork: 147 Star: 511 (更新于 2024-10-29 06:09:45)
license: MIT
Language: Swift .
Connect your Phoenix and iOS applications through WebSockets!
最后发布版本: 5.3.3 ( 2024-07-30 21:22:10)
Swift Phoenix Client
About
SwiftPhoenixClient is a Swift port of phoenix.js, allowing your swift projects to connect to a Phoenix Websocket backend.
We try out best to keep the library up to date with phoenix.js but if there is something that is missing, please create an issue or, even better, a PR to address the change.
Sample Projects
You can view the example of how to use SwiftPhoenixClient in the Example/ dir.
There are two primary classes, BasicViewController
and ChatRoomViewController
.
The BasicViewController
is designed to test against a local chat server
where as ChatRoomViewController
is a more "complete" example which targets
dwyl's phoenix-chat-example Heroku app.
SwiftPhoenixClient
The core module which provides the Phoenix Channels and Presence logic. It also uses URLSession's default WebSocket implementation which has a minimum iOS target of 13.0.
Installation
CocoaPods
You can install SwiftPhoenix Client via CocoaPods by adding the following to your Podfile. Keep in mind that in order to use Swift Phoenix Client, the minimum iOS target must be '9.0'
pod "SwiftPhoenixClient", '~> 5.3'
and running pod install
. From there you will need to add import SwiftPhoenixClient
in any class you want it to be used.
Carthage
If you use Carthage to manage your dependencies, simply add
SwiftPhoenixClient to your Cartfile
:
github "davidstump/SwiftPhoenixClient" ~> 5.3
Then run carthage update
.
If this is your first time using Carthage in the project, you'll need to go through some additional steps as explained over at Carthage.
SwiftPackageManager
Note: Instructions below are for using SwiftPM without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add SwiftPhoenixClient from there.
To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your Package.swift
:
.package(url: "https://github.com/davidstump/SwiftPhoenixClient.git", .upToNextMajor(from: "5.2.2"))
and then specify "SwiftPhoenixClient"
as a dependency of the Target in which you wish to use SwiftPhoenixClient.
Usage
Using the Swift Phoenix Client is extremely easy (and familiar if you have used the phoenix.js client).
See the Usage Guide for details instructions. You can also check out the documentation
Example
Check out the ViewController in this repo for a brief example of a simple iOS chat application using the Phoenix Chat Example
Also check out both the Swift and Elixir channels on IRC.
Development
Check out the wiki page for getting started
Thanks
Many many thanks to Daniel Rees for his many contributions and continued maintenance of this project!
License
SwiftPhoenixClient is available under the MIT license. See the LICENSE file for more info.
最近版本更新:(数据更新于 2024-09-02 20:36:40)
2024-07-30 21:22:10 5.3.3
2024-03-12 21:05:01 5.3.2
2023-09-29 10:22:07 5.3.1
2023-04-13 08:33:08 5.3.0
2023-03-07 23:38:00 5.2.2
2023-02-27 23:58:08 5.2.1
2023-02-25 00:05:42 5.2.0
2022-03-09 21:47:12 5.1.0
2022-02-08 00:48:09 5.0.0
2022-02-08 00:46:47 4.0.0
davidstump/SwiftPhoenixClient同语言 Swift最近更新仓库
2024-11-03 04:20:56 argmaxinc/WhisperKit
2024-11-01 03:30:19 wordpress-mobile/WordPress-iOS
2024-10-30 03:29:03 jordanbaird/Ice
2024-10-24 23:32:54 whoeevee/EeveeSpotify
2024-10-24 02:02:47 Artificial-Pancreas/iAPS
2024-10-23 00:57:58 pointfreeco/swift-composable-architecture