Skip to content

Commit

Permalink
Merge pull request #69 from tukcomCD2024/ios-jwt
Browse files Browse the repository at this point in the history
Ios jwt
  • Loading branch information
hhyukjin authored Sep 5, 2024
2 parents 8268ec0 + 1bd687d commit e4e4b85
Show file tree
Hide file tree
Showing 32 changed files with 2,606 additions and 157 deletions.
62 changes: 55 additions & 7 deletions iOS/Ringo/Ringo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
940C25872B7A89AB00E069D0 /* WebRTCClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940C25812B7A89AB00E069D0 /* WebRTCClient.swift */; };
940C25882B7A89AB00E069D0 /* SignalingClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940C25822B7A89AB00E069D0 /* SignalingClient.swift */; };
940C258A2B7A8FA900E069D0 /* CallService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940C25892B7A8FA900E069D0 /* CallService.swift */; };
9410C9402C87067A00B006A7 /* VideoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9410C93F2C87067A00B006A7 /* VideoViewController.swift */; };
941C657E2C69D5BB002BA61E /* ConnectingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 941C657D2C69D5BB002BA61E /* ConnectingView.swift */; };
94470A8A2B71050700F0A942 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = 94470A892B71050700F0A942 /* Alamofire */; };
94470A8D2B710A3100F0A942 /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 94470A8C2B710A3100F0A942 /* Starscream */; };
94470A902B710CE500F0A942 /* WebRTC in Frameworks */ = {isa = PBXBuildFile; productRef = 94470A8F2B710CE500F0A942 /* WebRTC */; };
Expand All @@ -39,8 +41,16 @@
945CF9842B67E1CE00396E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 945CF9832B67E1CE00396E4E /* Assets.xcassets */; };
945CF9872B67E1CE00396E4E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 945CF9852B67E1CE00396E4E /* LaunchScreen.storyboard */; };
945CF9902B69341800396E4E /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 945CF98F2B69341800396E4E /* SnapKit */; };
94FB0A6B2B858F66005A4915 /* TestSTTViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FB0A6A2B858F66005A4915 /* TestSTTViewController.swift */; };
94C3E5412C3398C900EBF588 /* AuthInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C3E5402C3398C900EBF588 /* AuthInterceptor.swift */; };
94C3E5432C351A6A00EBF588 /* UserManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C3E5422C351A6A00EBF588 /* UserManager.swift */; };
94C3E5452C4DF99200EBF588 /* SignupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C3E5442C4DF99200EBF588 /* SignupViewController.swift */; };
94C3E5472C4E26AE00EBF588 /* Language.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C3E5462C4E26AE00EBF588 /* Language.swift */; };
94FB0A6B2B858F66005A4915 /* STTViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FB0A6A2B858F66005A4915 /* STTViewController.swift */; };
94FB0A6D2BAAD64A005A4915 /* TTS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FB0A6C2BAAD64A005A4915 /* TTS.swift */; };
94FFD49B2C57BB2800C60F05 /* FriendRequestListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FFD49A2C57BB2800C60F05 /* FriendRequestListViewController.swift */; };
94FFD49D2C57BB7C00C60F05 /* FriendRequestListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FFD49C2C57BB7C00C60F05 /* FriendRequestListTableViewCell.swift */; };
94FFD49F2C58E59B00C60F05 /* FriendRequestList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FFD49E2C58E59B00C60F05 /* FriendRequestList.swift */; };
94FFD4A12C60968100C60F05 /* EditProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94FFD4A02C60968100C60F05 /* EditProfileViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -57,6 +67,8 @@
940C25812B7A89AB00E069D0 /* WebRTCClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebRTCClient.swift; sourceTree = "<group>"; };
940C25822B7A89AB00E069D0 /* SignalingClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalingClient.swift; sourceTree = "<group>"; };
940C25892B7A8FA900E069D0 /* CallService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallService.swift; sourceTree = "<group>"; };
9410C93F2C87067A00B006A7 /* VideoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoViewController.swift; sourceTree = "<group>"; };
941C657D2C69D5BB002BA61E /* ConnectingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectingView.swift; sourceTree = "<group>"; };
94470A922B7163E900F0A942 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
94470A942B71680100F0A942 /* SigninService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SigninService.swift; sourceTree = "<group>"; };
94470A962B717DC300F0A942 /* ConnectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionViewController.swift; sourceTree = "<group>"; };
Expand All @@ -74,8 +86,16 @@
945CF9832B67E1CE00396E4E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
945CF9862B67E1CE00396E4E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
945CF9882B67E1CE00396E4E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
94FB0A6A2B858F66005A4915 /* TestSTTViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestSTTViewController.swift; sourceTree = "<group>"; };
94C3E5402C3398C900EBF588 /* AuthInterceptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthInterceptor.swift; sourceTree = "<group>"; };
94C3E5422C351A6A00EBF588 /* UserManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserManager.swift; sourceTree = "<group>"; };
94C3E5442C4DF99200EBF588 /* SignupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignupViewController.swift; sourceTree = "<group>"; };
94C3E5462C4E26AE00EBF588 /* Language.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Language.swift; sourceTree = "<group>"; };
94FB0A6A2B858F66005A4915 /* STTViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = STTViewController.swift; sourceTree = "<group>"; };
94FB0A6C2BAAD64A005A4915 /* TTS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TTS.swift; sourceTree = "<group>"; };
94FFD49A2C57BB2800C60F05 /* FriendRequestListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendRequestListViewController.swift; sourceTree = "<group>"; };
94FFD49C2C57BB7C00C60F05 /* FriendRequestListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendRequestListTableViewCell.swift; sourceTree = "<group>"; };
94FFD49E2C58E59B00C60F05 /* FriendRequestList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendRequestList.swift; sourceTree = "<group>"; };
94FFD4A02C60968100C60F05 /* EditProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -138,12 +158,21 @@
94470A912B71157C00F0A942 /* Screens */ = {
isa = PBXGroup;
children = (
940C25632B73D20900E069D0 /* ConnectionCollectionViewCell.swift */,
94470A962B717DC300F0A942 /* ConnectionViewController.swift */,
9410C93F2C87067A00B006A7 /* VideoViewController.swift */,
941C657D2C69D5BB002BA61E /* ConnectingView.swift */,
945CF97E2B67E1CD00396E4E /* ViewController.swift */,
94C3E5442C4DF99200EBF588 /* SignupViewController.swift */,
945603122B6AC07D002F4B33 /* TabBarViewController.swift */,
945603222B6D31D9002F4B33 /* ContactsTableViewCell.swift */,
945603142B6AC22A002F4B33 /* ContactsViewController.swift */,
94FFD49A2C57BB2800C60F05 /* FriendRequestListViewController.swift */,
94FFD49C2C57BB7C00C60F05 /* FriendRequestListTableViewCell.swift */,
9456031C2B6BF44A002F4B33 /* FriendRequestViewController.swift */,
945603162B6AC2D3002F4B33 /* RecentsViewController.swift */,
945603182B6AC365002F4B33 /* AccountViewController.swift */,
94FFD4A02C60968100C60F05 /* EditProfileViewController.swift */,
);
path = Screens;
sourceTree = "<group>";
Expand All @@ -167,17 +196,18 @@
945CF9792B67E1CD00396E4E /* Ringo */ = {
isa = PBXGroup;
children = (
94C3E53F2C3397FF00EBF588 /* JWT */,
940C256A2B79EC5700E069D0 /* WebRTC */,
94470A912B71157C00F0A942 /* Screens */,
945CF97A2B67E1CD00396E4E /* AppDelegate.swift */,
945CF97C2B67E1CD00396E4E /* SceneDelegate.swift */,
940C25632B73D20900E069D0 /* ConnectionCollectionViewCell.swift */,
945603222B6D31D9002F4B33 /* ContactsTableViewCell.swift */,
94470A922B7163E900F0A942 /* Model.swift */,
94FFD49E2C58E59B00C60F05 /* FriendRequestList.swift */,
94C3E5422C351A6A00EBF588 /* UserManager.swift */,
94C3E5462C4E26AE00EBF588 /* Language.swift */,
94470A942B71680100F0A942 /* SigninService.swift */,
940C25652B74EF4D00E069D0 /* FriendService.swift */,
94470A962B717DC300F0A942 /* ConnectionViewController.swift */,
94FB0A6A2B858F66005A4915 /* TestSTTViewController.swift */,
94FB0A6A2B858F66005A4915 /* STTViewController.swift */,
94FB0A6C2BAAD64A005A4915 /* TTS.swift */,
945603202B6D2F06002F4B33 /* Canvas.swift */,
945CF9832B67E1CE00396E4E /* Assets.xcassets */,
Expand All @@ -187,6 +217,14 @@
path = Ringo;
sourceTree = "<group>";
};
94C3E53F2C3397FF00EBF588 /* JWT */ = {
isa = PBXGroup;
children = (
94C3E5402C3398C900EBF588 /* AuthInterceptor.swift */,
);
path = JWT;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -272,27 +310,37 @@
945603212B6D2F06002F4B33 /* Canvas.swift in Sources */,
94470A972B717DC300F0A942 /* ConnectionViewController.swift in Sources */,
945603132B6AC07D002F4B33 /* TabBarViewController.swift in Sources */,
94FFD49D2C57BB7C00C60F05 /* FriendRequestListTableViewCell.swift in Sources */,
940C25782B7A899500E069D0 /* RTCStates.swift in Sources */,
940C25852B7A89AB00E069D0 /* NativeWebSocket.swift in Sources */,
945CF97F2B67E1CD00396E4E /* ViewController.swift in Sources */,
940C25642B73D20900E069D0 /* ConnectionCollectionViewCell.swift in Sources */,
94FFD4A12C60968100C60F05 /* EditProfileViewController.swift in Sources */,
94FB0A6D2BAAD64A005A4915 /* TTS.swift in Sources */,
940C257A2B7A899500E069D0 /* IceCandidate.swift in Sources */,
941C657E2C69D5BB002BA61E /* ConnectingView.swift in Sources */,
94FFD49F2C58E59B00C60F05 /* FriendRequestList.swift in Sources */,
94C3E5412C3398C900EBF588 /* AuthInterceptor.swift in Sources */,
945603192B6AC365002F4B33 /* AccountViewController.swift in Sources */,
94C3E5452C4DF99200EBF588 /* SignupViewController.swift in Sources */,
940C258A2B7A8FA900E069D0 /* CallService.swift in Sources */,
94C3E5472C4E26AE00EBF588 /* Language.swift in Sources */,
945CF97B2B67E1CD00396E4E /* AppDelegate.swift in Sources */,
945603172B6AC2D3002F4B33 /* RecentsViewController.swift in Sources */,
940C25872B7A89AB00E069D0 /* WebRTCClient.swift in Sources */,
94FB0A6B2B858F66005A4915 /* TestSTTViewController.swift in Sources */,
94FB0A6B2B858F66005A4915 /* STTViewController.swift in Sources */,
945603232B6D31D9002F4B33 /* ContactsTableViewCell.swift in Sources */,
945CF97D2B67E1CD00396E4E /* SceneDelegate.swift in Sources */,
9410C9402C87067A00B006A7 /* VideoViewController.swift in Sources */,
94C3E5432C351A6A00EBF588 /* UserManager.swift in Sources */,
94470A932B7163E900F0A942 /* Model.swift in Sources */,
940C25662B74EF4D00E069D0 /* FriendService.swift in Sources */,
940C25792B7A899500E069D0 /* SessionDescription.swift in Sources */,
945603152B6AC22A002F4B33 /* ContactsViewController.swift in Sources */,
940C25722B7A88FB00E069D0 /* Config.swift in Sources */,
940C25842B7A89AB00E069D0 /* WebSocketProvider.swift in Sources */,
940C25882B7A89AB00E069D0 /* SignalingClient.swift in Sources */,
94FFD49B2C57BB2800C60F05 /* FriendRequestListViewController.swift in Sources */,
940C25832B7A89AB00E069D0 /* Message.swift in Sources */,
940C25862B7A89AB00E069D0 /* StarscreamProvider.swift in Sources */,
9456031D2B6BF44A002F4B33 /* FriendRequestViewController.swift in Sources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
filePath = "Ringo/Screens/ContactsViewController.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "59"
endingLineNumber = "59"
startingLineNumber = "83"
endingLineNumber = "83"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
Expand Down
47 changes: 47 additions & 0 deletions iOS/Ringo/Ringo/FriendRequestList.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// FriendRequestList.swift
// Ringo
//
// Created by 강진혁 on 7/30/24.
//

import Foundation

class FriendRequestList {
static let shared = FriendRequestList()
private var list: [FriendInfo] = []
func getList() -> [FriendInfo] {
return list
}
func remove(at index: Int) {
list.remove(at: index)
}
func reload() {
guard let email = UserManager.getData(type: String.self, forKey: .email) else { return }
FriendService.shared.loadRequestList(email: email) { response in
switch response {
case .success(let data):
guard let data = data as? [FriendInfo] else { return }
if !data.isEmpty {
self.list = data
} else {
self.list = data
}

case .requestErr(let err):
print(err)
case .pathErr:
print("pathErr")
case .serverErr:
print("serverErr")
case .networkFail:
print("networkFail")
case .dataErr:
print("dataErr")
}
}
}
func reset(){
list = []
}
}
Loading

0 comments on commit e4e4b85

Please sign in to comment.