Skip to content

Commit

Permalink
fix: 충돌 임시 커밋
Browse files Browse the repository at this point in the history
  • Loading branch information
hooni0918 committed Jul 16, 2024
2 parents 2d24cb4 + 917f8bb commit a6f0180
Show file tree
Hide file tree
Showing 158 changed files with 8,398 additions and 429 deletions.
8 changes: 0 additions & 8 deletions File.swift

This file was deleted.

958 changes: 874 additions & 84 deletions KkuMulKum.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@
"version" : "1.26.0"
}
},
{
"identity" : "swiftkeychainwrapper",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jrendel/SwiftKeychainWrapper.git",
"state" : {
"revision" : "185a3165346a03767101c4f62e9a545a0fe0530f",
"version" : "4.0.1"
}
},
{
"identity" : "then",
"kind" : "remoteSourceControl",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
LastUpgradeVersion = "1520"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 7 additions & 3 deletions KkuMulKum/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// KakaoSDK 초기화
sleep(1) //런치스크린 작동용
// KakaoSDK 초기화 과정에서 앱 키를 동적으로 불러오기
if let kakaoAppKey = fetchKakaoAppKeyFromPrivacyInfo() {
KakaoSDK.initSDK(appKey: kakaoAppKey)
print("Kakao SDK initialized with app key: \(kakaoAppKey)")
} else {
print("Failed to load KAKAO_APP_KEY from PrivacyInfo.plist")
}

// Firebase 초기화 및 FCM 설정
setupFirebase(application: application)

return true
Expand All @@ -43,7 +43,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

// 카카오 로그인
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
if AuthApi.isKakaoTalkLoginUrl(url) {
return AuthController.handleOpenUrl(url: url)
}
Expand Down
2 changes: 1 addition & 1 deletion KkuMulKum/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
) {
guard let windowScene = (scene as? UIWindowScene) else { return }
self.window = UIWindow(windowScene: windowScene)
self.window?.rootViewController = MainTabBarController()
self.window?.rootViewController = LoginViewController()
self.window?.makeKeyAndVisible()
}

Expand Down
4 changes: 4 additions & 0 deletions KkuMulKum/KkuMulKum.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
<array>
<string>Default</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)KkuMulKum.yizihn</string>
</array>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
import Foundation

struct SocialLoginRequestModel: RequestModelType {
let provider: String?
let provider: String
let fcmToken: String
}
18 changes: 17 additions & 1 deletion KkuMulKum/Network/DTO/Model/Auth/SocialLoginResponseModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,21 @@
import Foundation

struct SocialLoginResponseModel: ResponseModelType {
let name, accessToken, refreshToken: String?
let name: String?
let jwtTokenDTO: JwtTokenDTO

enum CodingKeys: String, CodingKey {
case name
case jwtTokenDTO = "jwtTokenDto"
}
}

struct JwtTokenDTO: Codable {
let accessToken: String
let refreshToken: String
}

struct RefreshTokenResponseModel: ResponseModelType {
let accessToken: String
let refreshToken: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import Foundation

struct AddPromiseModel: RequestModelType {
let name, placeName, x, y, address, roadAddress, time, dressUpLevel, penalty: String
let name, placeName, address, roadAddress, time, dressUpLevel, penalty: String
let x, y: Double
let id: Int
let participants: [Int]
}

This file was deleted.

21 changes: 21 additions & 0 deletions KkuMulKum/Network/DTO/Model/Promises/MeetingPromisesModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// MeetingPromisesModel.swift
// KkuMulKum
//
// Created by 김진웅 on 7/10/24.
//

import Foundation

struct MeetingPromisesModel: ResponseModelType {
let promises: [MeetingPromise]
}

struct MeetingPromise: Codable {
let id: Int
let name: String
let dDay: Int
let date: String
let time: String
let placeName: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ import Foundation
// MARK: 오늘 가장 가까운 약속 조회 (1개)

struct NearestPromiseModel: ResponseModelType {
let id, dDay: Int
let promiseID, dDay: Int
let name, meetingName, dressUpLevel, date, time, placeName: String

enum CodingKeys: String, CodingKey {
case promiseID = "promiseId"
case dDay
case name
case meetingName
case dressUpLevel
case date
case time
case placeName
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,16 @@
import Foundation

struct PromiseInfoModel: ResponseModelType {
let promiseID: Int
let placeName, address, roadAddress, time, dressUpLevel, penalty: String

enum CodingKeys: String, CodingKey {
case promiseID = "promiseId"
case placeName
case address
case roadAddress
case time
case dressUpLevel
case penalty
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ import Foundation
// MARK: 약속 참여자 목록

struct PromiseParticipantListModel: ResponseModelType {
let participantCount: Int
let participants: [Participant]
}

struct Participant: Codable {
let id: Int
let name, profileImageURL, state: String
let participantId, memberId: Int
let name, state: String
let profileImageURL: String?

enum CodingKeys: String, CodingKey {
case id
case participantId
case memberId
case name
case profileImageURL = "profileImg"
case state
case profileImageURL = "profileImg"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,18 @@

import Foundation

struct PromiseLateInfoModel: ResponseModelType {
let penalty, name, profileImageURL: String
struct TardyInfoModel: ResponseModelType {
let penalty: String
let isPastDue: Bool
let lateComers: [Comer]
let id: Int

enum CodingKeys: String, CodingKey {
case penalty
case name
case profileImageURL = "profileImg"
case isPastDue
case lateComers
case id
}
}

struct Comer: Codable {
let id: Int
let participantId: Int
let name, profileImageURL: String

enum CodingKeys: String, CodingKey {
case id
case participantId
case name
case profileImageURL = "profileImg"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ struct UpcomingPromiseListModel: ResponseModelType {
}

struct UpcomingPromise: Codable {
let id, dDay: Int
let promiseID, dDay: Int
let name, meetingName, dressUpLevel, date, time, placeName: String

enum CodingKeys: String, CodingKey {
case promiseID = "promiseId"
case dDay
case name
case meetingName
case dressUpLevel
case date
case time
case placeName
}
}
2 changes: 2 additions & 0 deletions KkuMulKum/Network/DTO/ResponseBody/ResponseBodyDTO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Foundation

/// 제네릭 ResponseBody 구조체 정의
struct ResponseBodyDTO<T: ResponseModelType>: Codable {
let success: Bool
let data: T?
let error: ErrorResponse?
}
Expand All @@ -18,3 +19,4 @@ struct ErrorResponse: Codable {
let code: Int
let message: String
}

70 changes: 70 additions & 0 deletions KkuMulKum/Network/DTO/TargetType/LoginTargetType.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
//
// LoginService.swift
// KkuMulKum
//
// Created by 이지훈 on 7/15/24.
//

import Foundation

import Moya

enum LoginTargetType {
case appleLogin(identityToken: String, fcmToken: String)
case kakaoLogin(accessToken: String, fcmToken: String)
case refreshToken(refreshToken: String)
}

extension LoginTargetType: TargetType {

var method: Moya.Method {
.post
}

var baseURL: URL {
guard let privacyInfo = Bundle.main.privacyInfo,
let urlString = privacyInfo["BASE_URL"] as? String,
let url = URL(string: urlString) else {
fatalError("Invalid BASE_URL in PrivacyInfo.plist")
}
return url
}

var path: String {
switch self {
case .appleLogin, .kakaoLogin:
return "/api/v1/auth/signin"
case .refreshToken:
return "/api/v1/auth/reissue"
}
}

var task: Task {
switch self {
case let .appleLogin(_, fcmToken):
return .requestParameters(
parameters: ["provider": "APPLE", "fcmToken": fcmToken],
encoding: JSONEncoding.default
)
case let .kakaoLogin(_, fcmToken):
return .requestParameters(
parameters: ["provider": "KAKAO", "fcmToken": fcmToken],
encoding: JSONEncoding.default
)
case .refreshToken:
return .requestPlain
}
}

var headers: [String : String]? {
switch self {
case .appleLogin(let identityToken, _):
return ["Authorization": identityToken, "Content-Type": "application/json"]
case .kakaoLogin(let accessToken, _):
return ["Authorization": accessToken, "Content-Type": "application/json"]
case .refreshToken(let refreshToken):
return ["Authorization": refreshToken, "Content-Type": "application/json"]
}
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "appstore.png",
"filename" : "app_icon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading

0 comments on commit a6f0180

Please sign in to comment.