Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 9bacc5c

Browse files
authored
Update project configuration to remove Jellyfish references (#20)
Update all references in code to only use Fishjam. This include names in code, project names, build variables. I also updated `protos`, README and few other small things
1 parent 352d0cf commit 9bacc5c

35 files changed

+211
-207
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
run: swift package update Mockingbird && ./gen-mocks.sh
2121

2222
- name: Run tests 💀
23-
run: set -o pipefail && xcodebuild -scheme JellyfishClientSdkTests test -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" | xcbeautify
23+
run: set -o pipefail && xcodebuild -scheme FishjamClientTests test -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" | xcbeautify

.github/workflows/publish_docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313

1414
- name: Build Docs
15-
run: mkdir docs && xcodebuild docbuild -scheme JellyfishClientSdk -destination generic/platform=iOS OTHER_DOCC_FLAGS="--transform-for-static-hosting --output-path docs --hosting-base-path ios-client-sdk"
15+
run: mkdir docs && xcodebuild docbuild -scheme FishjamClient -destination generic/platform=iOS OTHER_DOCC_FLAGS="--transform-for-static-hosting --output-path docs --hosting-base-path ios-client-sdk"
1616

1717
- name: Install coreutils
1818
run: brew install coreutils

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ iOSInjectionProject/
9292

9393
node_modules
9494

95-
JellyfishClientDemo/Debug.xcconfig
95+
FishjamClientDemo/Debug.xcconfig
9696

9797
# Generated
9898
*.generated.swift

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "protos"]
22
path = protos
3-
url = https://github.com/jellyfish-dev/protos.git
3+
url = https://github.com/fishjam-dev/protos.git

JellyfishClient.xcworkspace/contents.xcworkspacedata FishjamClient.xcworkspace/contents.xcworkspacedata

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JellyfishClientDemo/JellyfishClientDemo.xcodeproj/project.pbxproj FishjamClientDemo/FishjamClientDemo.xcodeproj/project.pbxproj

+63-63
Large diffs are not rendered by default.

JellyfishClientDemo/JellyfishClientDemo.xcodeproj/xcshareddata/xcschemes/JellyfishClientDemo.xcscheme FishjamClientDemo/FishjamClientDemo.xcodeproj/xcshareddata/xcschemes/FishjamClientDemo.xcscheme

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "2FB8B3CD2A20C6DA0060E251"
18-
BuildableName = "JellyfishClientDemo.app"
19-
BlueprintName = "JellyfishClientDemo"
20-
ReferencedContainer = "container:JellyfishClientDemo.xcodeproj">
18+
BuildableName = "FishjamClientDemo.app"
19+
BlueprintName = "FishjamClientDemo"
20+
ReferencedContainer = "container:FishjamClientDemo.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
2323
</BuildActionEntries>
@@ -35,9 +35,9 @@
3535
<BuildableReference
3636
BuildableIdentifier = "primary"
3737
BlueprintIdentifier = "2FB8B3DD2A20C6DD0060E251"
38-
BuildableName = "JellyfishClientDemoTests.xctest"
39-
BlueprintName = "JellyfishClientDemoTests"
40-
ReferencedContainer = "container:JellyfishClientDemo.xcodeproj">
38+
BuildableName = "FishjamClientDemoTests.xctest"
39+
BlueprintName = "FishjamClientDemoTests"
40+
ReferencedContainer = "container:FishjamClientDemo.xcodeproj">
4141
</BuildableReference>
4242
</TestableReference>
4343
<TestableReference
@@ -46,9 +46,9 @@
4646
<BuildableReference
4747
BuildableIdentifier = "primary"
4848
BlueprintIdentifier = "2FB8B3E72A20C6DD0060E251"
49-
BuildableName = "JellyfishClientDemoUITests.xctest"
50-
BlueprintName = "JellyfishClientDemoUITests"
51-
ReferencedContainer = "container:JellyfishClientDemo.xcodeproj">
49+
BuildableName = "FishjamClientDemoUITests.xctest"
50+
BlueprintName = "FishjamClientDemoUITests"
51+
ReferencedContainer = "container:FishjamClientDemo.xcodeproj">
5252
</BuildableReference>
5353
</TestableReference>
5454
</Testables>
@@ -68,9 +68,9 @@
6868
<BuildableReference
6969
BuildableIdentifier = "primary"
7070
BlueprintIdentifier = "2FB8B3CD2A20C6DA0060E251"
71-
BuildableName = "JellyfishClientDemo.app"
72-
BlueprintName = "JellyfishClientDemo"
73-
ReferencedContainer = "container:JellyfishClientDemo.xcodeproj">
71+
BuildableName = "FishjamClientDemo.app"
72+
BlueprintName = "FishjamClientDemo"
73+
ReferencedContainer = "container:FishjamClientDemo.xcodeproj">
7474
</BuildableReference>
7575
</BuildableProductRunnable>
7676
</LaunchAction>
@@ -85,9 +85,9 @@
8585
<BuildableReference
8686
BuildableIdentifier = "primary"
8787
BlueprintIdentifier = "2FB8B3CD2A20C6DA0060E251"
88-
BuildableName = "JellyfishClientDemo.app"
89-
BlueprintName = "JellyfishClientDemo"
90-
ReferencedContainer = "container:JellyfishClientDemo.xcodeproj">
88+
BuildableName = "FishjamClientDemo.app"
89+
BlueprintName = "FishjamClientDemo"
90+
ReferencedContainer = "container:FishjamClientDemo.xcodeproj">
9191
</BuildableReference>
9292
</BuildableProductRunnable>
9393
</ProfileAction>

JellyfishClientDemo/JellyfishClientDemo/ContentView.swift FishjamClientDemo/FishjamClientDemo/ContentView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// ContentView.swift
3-
// JellyfishClientDemo
3+
// FishjamClientDemo
44
//
55
// Created by Karol Sygiet on 26/05/2023.
66
//

JellyfishClientDemo/JellyfishClientDemo/ContentViewController.swift FishjamClientDemo/FishjamClientDemo/ContentViewController.swift

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//
22
// ContentViewController.swift
3-
// JellyfishClientDemo
3+
// FishjamClientDemo
44
//
55
// Created by Karol Sygiet on 02/06/2023.
66
//
77

8+
import FishjamClient
89
import Foundation
9-
import JellyfishClientSdk
1010
import UIKit
1111

1212
struct Participant {
@@ -39,7 +39,7 @@ class ParticipantVideo: Identifiable, ObservableObject {
3939
}
4040

4141
class ContentViewController: ObservableObject {
42-
private var jellyfishClient: JellyfishClientSdk?
42+
private var fishjamClient: FishjamClient?
4343

4444
@Published var participants: [String: Participant]
4545
@Published var participantVideos: [ParticipantVideo]
@@ -57,12 +57,12 @@ class ContentViewController: ObservableObject {
5757
self.localParticipantId = "local"
5858
self.connected = false
5959

60-
self.jellyfishClient = JellyfishClientSdk(listener: self)
60+
self.fishjamClient = FishjamClient(listener: self)
6161
}
6262

6363
public func connect(peerToken: String) {
6464
let conf = Config(
65-
websocketUrl: (Bundle.main.infoDictionary?["jellyfish_url"] as! String),
65+
websocketUrl: (Bundle.main.infoDictionary?["fishjam_url"] as! String),
6666
token: peerToken
6767
)
6868

@@ -81,20 +81,20 @@ class ContentViewController: ObservableObject {
8181
simulcastConfig: SimulcastConfig(enabled: false)
8282
)
8383

84-
jellyfishClient?.connect(config: conf)
84+
fishjamClient?.connect(config: conf)
8585

86-
self.localVideoTrack = jellyfishClient?.createVideoTrack(
86+
self.localVideoTrack = fishjamClient?.createVideoTrack(
8787
videoParameters: videoParameters, metadata: .init(videoTrackMetadata))
88-
self.localAudioTrack = jellyfishClient?.createAudioTrack(metadata: .init(audioTrackMetadata))
88+
self.localAudioTrack = fishjamClient?.createAudioTrack(metadata: .init(audioTrackMetadata))
8989

9090
}
9191

9292
public func disconnect() {
93-
jellyfishClient?.cleanUp()
93+
fishjamClient?.cleanUp()
9494
}
9595
}
9696

97-
extension ContentViewController: JellyfishClientListener {
97+
extension ContentViewController: FishjamClientListener {
9898
func onBandwidthEstimationChanged(estimation: Int) {
9999

100100
}
@@ -267,7 +267,7 @@ extension ContentViewController: JellyfishClientListener {
267267
}
268268

269269
func onAuthSuccess() {
270-
jellyfishClient?.join(peerMetadata: .init(["displayName": "iphoneUser"]))
270+
fishjamClient?.join(peerMetadata: .init(["displayName": "iphoneUser"]))
271271
}
272272

273273
func onAuthError() {}

JellyfishClientDemo/JellyfishClientDemo/JellyfishClientDemoApp.swift FishjamClientDemo/FishjamClientDemo/FishjamClientDemoApp.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//
2-
// JellyfishClientDemoApp.swift
3-
// JellyfishClientDemo
2+
// FishjamClientDemoApp.swift
3+
// FishjamClientDemo
44
//
55
// Created by Karol Sygiet on 26/05/2023.
66
//
77

88
import SwiftUI
99

1010
@main
11-
struct JellyfishClientDemoApp: App {
11+
struct FishjamClientDemoApp: App {
1212
var body: some Scene {
1313
WindowGroup {
1414
ContentView()

JellyfishClientDemo/JellyfishClientDemo/Info.plist FishjamClientDemo/FishjamClientDemo/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>jellyfish_url</key>
6-
<string>$(jellyfish_url)</string>
5+
<key>fishjam_url</key>
6+
<string>$(fishjam_url)</string>
77
<key>NSAppTransportSecurity</key>
88
<dict>
99
<key>NSAllowsArbitraryLoads</key>

JellyfishClientDemo/JellyfishClientDemo/ParticipantVideoView.swift FishjamClientDemo/FishjamClientDemo/ParticipantVideoView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import JellyfishClientSdk
1+
import FishjamClient
22
import SwiftUI
33

44
struct ParticipantVideoView: View {

FishjamClientDemo/Release.xcconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fishjam_url = ws:/$()/192.168.0.164:4000/socket/peer/websocket

JellyfishClientDemo/Release.xcconfig

-1
This file was deleted.

Package.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "JellyfishClientSdk",
7+
name: "FishjamClient",
88
platforms: [
99
.iOS(.v13)
1010
],
1111
products: [
1212
// Products define the executables and libraries a package produces, and make them visible to other packages.
1313
.library(
14-
name: "JellyfishClientSdk",
15-
targets: ["JellyfishClientSdk"])
14+
name: "FishjamClient",
15+
targets: ["FishjamClient"])
1616
],
1717
dependencies: [
1818
.package(name: "WebRTC", url: "https://github.com/webrtc-sdk/Specs.git", .exact("114.5735.08")),
@@ -37,14 +37,14 @@ let package = Package(
3737
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
3838
// Targets can depend on other targets in this package, and on products in packages this package depends on.
3939
.target(
40-
name: "JellyfishClientSdk",
40+
name: "FishjamClient",
4141
dependencies: [
4242
"WebRTC", "SwiftProtobuf", "Promises", "SwiftPhoenixClient",
4343
.product(name: "Starscream", package: "Starscream"),
4444
.product(name: "FBLPromises", package: "Promises"),
4545
.product(name: "Logging", package: "swift-log"),
4646
],
4747
path: "Sources"),
48-
.testTarget(name: "JellyfishClientSdkTests", dependencies: ["JellyfishClientSdk", "Mockingbird"]),
48+
.testTarget(name: "FishjamClientTests", dependencies: ["FishjamClient", "Mockingbird"]),
4949
]
5050
)

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
The repository consists of 3 separate components:
88

9-
- `JellyfishClientSdk` - Fishjam client fully compatible with `Fishjam`, responsible for exchanging media events and
9+
- `FishjamClient` - Fishjam client fully compatible with `Fishjam`, responsible for exchanging media events and
1010
receiving media streams which then are presented to the user
11-
- `JellyfishCLientDemo` - Demo application utilizing `Fishjam` client
11+
- `FishjamClientDemo` - Demo application utilizing `Fishjam` client
1212
- `MembraneRTC` - iOS WebRTC client
1313

1414
### Example App
@@ -24,7 +24,7 @@ API documentation is available [here](https://fishjam-dev.github.io/ios-client-s
2424

2525
## Installation
2626

27-
Add FishjamClientSDK dependency to your project.
27+
Add FishjamClient dependency to your project.
2828

2929
## Developing
3030

Sources/JellyfishClientSdk/JellyfishClientSdk.swift Sources/FishjamClient/FishjamClient.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ public struct Config {
1111
}
1212
}
1313

14-
internal protocol JellyfishWebsocket {
14+
internal protocol FishjamWebsocket {
1515
var delegate: WebSocketDelegate? { get set }
1616
func connect()
1717
func disconnect()
1818
func write(data: Data)
1919
}
2020

21-
public class JellyfishClientWebSocket: JellyfishWebsocket {
21+
public class FishjamClientWebSocket: FishjamWebsocket {
2222
var socket: WebSocket
2323
var delegate: WebSocketDelegate? {
2424
set { self.socket.delegate = newValue }
@@ -42,18 +42,18 @@ public class JellyfishClientWebSocket: JellyfishWebsocket {
4242
}
4343
}
4444

45-
internal func websocketFactory(url: String) -> JellyfishWebsocket {
45+
internal func websocketFactory(url: String) -> FishjamWebsocket {
4646
let url = URL(string: url)
4747
let urlRequest = URLRequest(url: url!)
48-
return JellyfishClientWebSocket(socket: WebSocket(request: urlRequest))
48+
return FishjamClientWebSocket(socket: WebSocket(request: urlRequest))
4949
}
5050

51-
public class JellyfishClientSdk {
52-
private var client: JellyfishClientInternal
51+
public class FishjamClient {
52+
private var client: FishjamClientInternal
5353
private var webrtcClient: MembraneRTC
5454

55-
public init(listener: JellyfishClientListener) {
56-
self.client = JellyfishClientInternal(listener: listener, websocketFactory: websocketFactory)
55+
public init(listener: FishjamClientListener) {
56+
self.client = FishjamClientInternal(listener: listener, websocketFactory: websocketFactory)
5757
self.webrtcClient = MembraneRTC.create(delegate: self.client)
5858
self.client.webrtcClient = self.webrtcClient
5959
}
@@ -85,8 +85,8 @@ public class JellyfishClientSdk {
8585
}
8686

8787
/**
88-
* Tries to join the room. If user is accepted then {@link JellyfishClient.onJoinSuccess} will be called.
89-
* In other case {@link JellyfishClient.onJoinError} is invoked.
88+
* Tries to join the room. If user is accepted then {@link FishjamClient.onJoinSuccess} will be called.
89+
* In other case {@link FishjamClient.onJoinError} is invoked.
9090
*
9191
* @param peerMetadata - Any information that other peers will receive in onPeerJoined
9292
* after accepting this peer

Sources/JellyfishClientSdk/JellyfishClientInternal.swift Sources/FishjamClient/FishjamClientInternal.swift

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import Foundation
22
import Starscream
33

4-
internal class JellyfishClientInternal: MembraneRTCDelegate, WebSocketDelegate {
4+
internal class FishjamClientInternal: MembraneRTCDelegate, WebSocketDelegate {
55
private var config: Config?
6-
private var webSocket: JellyfishWebsocket?
7-
private var listener: JellyfishClientListener
8-
private var websocketFactory: (String) -> JellyfishWebsocket
9-
var webrtcClient: JellyfishMembraneRTC?
6+
private var webSocket: FishjamWebsocket?
7+
private var listener: FishjamClientListener
8+
private var websocketFactory: (String) -> FishjamWebsocket
9+
var webrtcClient: FishjamMembraneRTC?
1010

11-
public init(listener: JellyfishClientListener, websocketFactory: @escaping (String) -> JellyfishWebsocket) {
11+
public init(listener: FishjamClientListener, websocketFactory: @escaping (String) -> FishjamWebsocket) {
1212
self.listener = listener
1313
self.websocketFactory = websocketFactory
1414
}
@@ -61,8 +61,8 @@ internal class JellyfishClientInternal: MembraneRTCDelegate, WebSocketDelegate {
6161

6262
func websocketDidConnect() {
6363
onSocketOpen()
64-
let authRequest = Jellyfish_PeerMessage.with({
65-
$0.authRequest = Jellyfish_PeerMessage.AuthRequest.with({
64+
let authRequest = Fishjam_PeerMessage.with({
65+
$0.authRequest = Fishjam_PeerMessage.AuthRequest.with({
6666
$0.token = self.config?.token ?? ""
6767
})
6868
})
@@ -75,7 +75,7 @@ internal class JellyfishClientInternal: MembraneRTCDelegate, WebSocketDelegate {
7575

7676
func websocketDidReceiveData(data: Data) {
7777
do {
78-
let peerMessage = try Jellyfish_PeerMessage(serializedData: data)
78+
let peerMessage = try Fishjam_PeerMessage(serializedData: data)
7979
if case .authenticated(_) = peerMessage.content {
8080
onAuthSuccess()
8181
} else if case .mediaEvent(_) = peerMessage.content {
@@ -115,8 +115,8 @@ internal class JellyfishClientInternal: MembraneRTCDelegate, WebSocketDelegate {
115115

116116
func onSendMediaEvent(event: SerializedMediaEvent) {
117117
let mediaEvent =
118-
Jellyfish_PeerMessage.with({
119-
$0.mediaEvent = Jellyfish_PeerMessage.MediaEvent.with({
118+
Fishjam_PeerMessage.with({
119+
$0.mediaEvent = Fishjam_PeerMessage.MediaEvent.with({
120120
$0.data = event
121121
})
122122
})

0 commit comments

Comments
 (0)