Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
70 changes: 70 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno

### Projects ###
*.xcodeproj
*.xcworkspace
*.xcconfig

### Tuist derived files ###
graph.dot
Derived/

### Tuist managed dependencies ###
Tuist/.build
24 changes: 24 additions & 0 deletions .package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"originHash" : "0a9a0565c23645eacdcd0d177a036429567ab510b257a7f2538ea8bb318bf8d2",
"pins" : [
{
"identity" : "alamofire",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Alamofire/Alamofire.git",
"state" : {
"revision" : "513364f870f6bfc468f9d2ff0a95caccc10044c5",
"version" : "5.10.2"
}
},
{
"identity" : "kakao-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kakao/kakao-ios-sdk",
"state" : {
"revision" : "787763e335949dfad6b721aa04771e22d04e1493",
"version" : "2.24.2"
}
}
],
"version" : 3
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

Binary file added Lecture2Quiz/.Project.swift.swp
Binary file not shown.
70 changes: 70 additions & 0 deletions Lecture2Quiz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno

### Projects ###
*.xcodeproj
*.xcworkspace

### Tuist derived files ###
graph.dot
Derived/

### Tuist managed dependencies ###
Tuist/.build
65 changes: 65 additions & 0 deletions Lecture2Quiz/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import ProjectDescription

let project = Project(
name: "Lecture2Quiz",
packages: [
.package(url: "https://github.com/kakao/kakao-ios-sdk", .upToNextMajor(from: "2.13.0")),
.package(url: "https://github.com/Moya/Moya.git", .exact("15.0.0"))
],
// ✅ 아래처럼 settings도 추가해야 함
settings: .settings(
configurations: [
.debug(name: "SecretOnly", xcconfig: .relativeToRoot("../Lecture2Quiz/Configuration/Secret.xcconfig"))
]
),
targets: [
.target(
name: "Lecture2Quiz",
destinations: .iOS,
product: .app,
bundleId: "io.tuist.Lecture2Quiz",
infoPlist: .extendingDefault(
with: [
// 1️⃣ 런치 스크린 설정
"UILaunchScreen": [
"UIColorName": "",
"UIImageName": ""
],

// 2️⃣ 마이크 권한
"NSMicrophoneUsageDescription": "앱이 녹음을 위해 마이크를 사용합니다.",

// 3️⃣ 네트워크 권한 (ws:// 프로토콜 허용)
"NSAppTransportSecurity": [
"NSAllowsArbitraryLoads": true
],

// ✅ Secret.xcconfig에서 가져올 값들
"API_URL": "$(API_URL)",
"Kakao_AppKey": "$(Kakao_AppKey)",
"AudioAPI_URL": "$(AudioAPI_URL)"
]
),
sources: ["Lecture2Quiz/Sources/**"],
resources: ["Lecture2Quiz/Resources/**"],
dependencies: [
.package(product: "KakaoSDKCommon"),
.package(product: "KakaoSDKAuth"),
.package(product: "KakaoSDKUser"),
.package(product: "Moya")
]
),
.target(
name: "Lecture2QuizTests",
destinations: .iOS,
product: .unitTests,
bundleId: "io.tuist.Lecture2QuizTests",
infoPlist: .default,
sources: ["Lecture2Quiz/Tests/**"],
resources: [],
dependencies: [
.target(name: "Lecture2Quiz")
]
)
]
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@
"size" : "40x40"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Logo_Lecture2Quiz.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ extension CourseAPI: TargetType {
case .deleteCourse(let courseId):
return "/v1/course/\(courseId)"
case .deleteWeek(let weekId):
return "/api/weeks/\(weekId)"
return "/weeks/\(weekId)"
case .deleteText(let textId), .updateText(let textId, _, _):
return "/v1/texts/\(textId)"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ enum QuizAPI {

// 퀴즈 삭제
case deleteQuiz(id: Int)

// 퀴즈 세션 삭제(다수)
case deleteQuizSessions(sessionIds: [Int])

}

extension QuizAPI: TargetType {
Expand Down Expand Up @@ -74,6 +78,9 @@ extension QuizAPI: TargetType {
return "/v1/quiz-sessions/\(sessionId)"
case .deleteQuiz(let id):
return "/v1/quizzes/\(id)"
case .deleteQuizSessions:
return "/v1/quiz-sessions/batch"

}
}

Expand All @@ -83,7 +90,7 @@ extension QuizAPI: TargetType {
return .post
case .getQuizzes, .getWeekQuestions, .getQuizDetail, .getUserQuizSessions, .getQuizSessionDetail:
return .get
case .deleteQuiz:
case .deleteQuiz, .deleteQuizSessions:
return .delete
}
}
Expand Down Expand Up @@ -120,6 +127,10 @@ extension QuizAPI: TargetType {
case .deleteQuiz:
return .requestPlain

case .deleteQuizSessions(let sessionIds):
let body = ["sessionIds": sessionIds]
return .requestParameters(parameters: body, encoding: JSONEncoding.default)

default:
return .requestPlain // GET 요청 또는 바디 없는 POST
}
Expand Down
Loading