Skip to content

Commit 3e2aa75

Browse files
authored
Merge branch 'develop' into fix/#115
2 parents 5054ef6 + e6e02dd commit 3e2aa75

27 files changed

+1069
-1036
lines changed

β€Ž.github/workflows/continuous-integration.ymlβ€Ž

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,17 @@ jobs:
2222
BASE_URL: ${{ secrets.BASE_URL }}
2323
KAKAO_API_KEY: ${{ secrets.KAKAO_API_KEY }}
2424
run: |
25-
echo "// Configuration settings file format documentation can be found at:" > Release.xcconfig
26-
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Release.xcconfig
27-
echo "// API μ—”λ“œ 포인트 μ£Όμ†Œ" >> Release.xcconfig
25+
cd EATSSU_MVC/EATSSU_MVC/Resources
26+
mkdir Secrets
27+
cd Secrets
28+
2829
echo "BASE_URL = $BASE_URL" >> Release.xcconfig
29-
echo "// 카카였 API ν‚€" >> Release.xcconfig
3030
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Release.xcconfig
3131
cat Release.xcconfig
32-
mv Release.xcconfig EATSSU_MVC/EATSSU_MVC/Resources
3332
34-
echo "// Configuration settings file format documentation can be found at:" > Debug.xcconfig
35-
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Debug.xcconfig
36-
echo "// API μ—”λ“œ 포인트 μ£Όμ†Œ" >> Debug.xcconfig
3733
echo "BASE_URL = $BASE_URL" >> Debug.xcconfig
38-
echo "// 카카였 API ν‚€" >> Debug.xcconfig
3934
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Debug.xcconfig
4035
cat Debug.xcconfig
41-
mv Debug.xcconfig EATSSU_MVC/EATSSU_MVC/Resources
4236
4337
- name: Install Dependencies
4438
run: |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Unsubscribe.png",
5+
"idiom" : "universal"
6+
}
7+
],
8+
"info" : {
9+
"author" : "xcode",
10+
"version" : 1
11+
}
12+
}
248 Bytes
Loading

β€ŽEATSSU_MVC/EATSSU_MVC/Sources/Notification/NotificationManager.swiftβ€Ž

Lines changed: 73 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,63 +9,78 @@ import Foundation
99
import UserNotifications
1010

1111
class NotificationManager {
12-
13-
// MARK: - Properties
14-
15-
static let shared = NotificationManager()
16-
17-
// MARK: - Methods
18-
19-
/// 평일 11μ‹œμ— μ•±μ˜ μœ μž…μ„ μœ λ„ν•˜λŠ” μ•Œλ¦Όμ„ λ°œμ†‘ν•˜λŠ” λ©”μ†Œλ“œ
20-
///
21-
/// - Title : πŸ€” 였늘 λ°₯ 뭐 먹지…
22-
/// - Body : 였늘의 학식을 ν™•μΈν•΄λ³΄μ„Έμš”!
23-
func scheduleWeekday11AMNotification() {
24-
let center = UNUserNotificationCenter.current()
25-
26-
// μ•Œλ¦Ό μ½˜ν…μΈ  μ„€μ •
27-
let content = UNMutableNotificationContent()
28-
29-
content.title = TextLiteral.Notification.dailyWeekdayNotificationTitle
30-
content.body = TextLiteral.Notification.dailyWeekdayNotificationBody
31-
content.sound = .default
32-
33-
// λ°˜λ³΅ν•  μš”μΌ 및 μ‹œκ°„ μ„€μ • (평일 μ˜€μ „ 11μ‹œ)
34-
let calendar = Calendar.current
35-
let weekdays = [2, 3, 4, 5, 6] // μ›”, ν™”, 수, λͺ©, 금 (Calendarμ—μ„œ 1이 μΌμš”μΌ)
36-
37-
for weekday in weekdays {
38-
var dateComponents = DateComponents()
39-
dateComponents.hour = 11
40-
dateComponents.minute = 0
41-
dateComponents.weekday = weekday
42-
43-
let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)
44-
45-
// κ³ μœ ν•œ μ‹λ³„μžλ₯Ό μœ„ν•΄ weekdayλ₯Ό μ‚¬μš©
46-
let identifier = "weekdayNotification-\(weekday)"
47-
let request = UNNotificationRequest(
48-
identifier: identifier, content: content, trigger: trigger)
49-
50-
// μ•Œλ¦Ό 등둝
51-
center.add(request) { error in
52-
if let error = error {
53-
print("μ•Œλ¦Ό 등둝 κ°„ μ—λŸ¬ λ©”μ‹œμ§€: \(error.localizedDescription)")
54-
}
55-
}
56-
}
57-
}
58-
59-
/// μ•± μ‹€ν–‰ μ‹œ μ•Œλ¦Ό λ°œμ†‘ κΆŒν•œμ„ μš”μ²­ν•˜λŠ” νŒμ—… 호좜 λ©”μ†Œλ“œ
60-
func requestNotificationPermission() {
61-
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) {
62-
granted, error in
63-
if granted {
64-
print("μ•Œλ¦Ό κΆŒν•œ 승인됨")
65-
} else {
66-
print("μ•Œλ¦Ό κΆŒν•œ 거뢀됨")
67-
}
68-
}
69-
}
12+
// MARK: - Properties
7013

14+
static let shared = NotificationManager()
15+
16+
// MARK: - Methods
17+
18+
/// 평일 11μ‹œμ— μ•±μ˜ μœ μž…μ„ μœ λ„ν•˜λŠ” ν‘Έμ‹œ μ•Œλ¦Όμ„ λ°œμ†‘ν•˜λŠ” λ©”μ†Œλ“œ
19+
///
20+
/// - Title : πŸ€” 였늘 λ°₯ 뭐 먹지…
21+
/// - Body : 였늘의 학식을 ν™•μΈν•΄λ³΄μ„Έμš”!
22+
func scheduleWeekday11AMNotification() {
23+
let center = UNUserNotificationCenter.current()
24+
25+
// μ•Œλ¦Ό μ½˜ν…μΈ  μ„€μ •
26+
let content = UNMutableNotificationContent()
27+
28+
content.title = TextLiteral.Notification.dailyWeekdayNotificationTitle
29+
content.body = TextLiteral.Notification.dailyWeekdayNotificationBody
30+
content.sound = .default
31+
32+
// λ°˜λ³΅ν•  μš”μΌ 및 μ‹œκ°„ μ„€μ • (평일 μ˜€μ „ 11μ‹œ)
33+
let weekdays = [2, 3, 4, 5, 6] // μ›”, ν™”, 수, λͺ©, 금 (Calendarμ—μ„œ 1이 μΌμš”μΌ)
34+
35+
for weekday in weekdays {
36+
var dateComponents = DateComponents()
37+
dateComponents.hour = 11
38+
dateComponents.minute = 0
39+
dateComponents.weekday = weekday
40+
41+
let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)
42+
43+
// κ³ μœ ν•œ μ‹λ³„μžλ₯Ό μœ„ν•΄ weekdayλ₯Ό μ‚¬μš©
44+
let identifier = "weekdayNotification-\(weekday)"
45+
let request = UNNotificationRequest(
46+
identifier: identifier, content: content, trigger: trigger)
47+
48+
// μ•Œλ¦Ό 등둝
49+
center.add(request) { error in
50+
if let error = error {
51+
print("μ•Œλ¦Ό 등둝 κ°„ μ—λŸ¬ λ©”μ‹œμ§€: \(error.localizedDescription)")
52+
}
53+
}
54+
}
55+
}
56+
57+
/// 평일 11μ‹œμ— μ•±μ˜ μœ μž…μ„ μœ λ„ν•˜λŠ” ν‘Έμ‹œ μ•Œλ¦Όμ„ μ·¨μ†Œν•˜λŠ” λ©”μ†Œλ“œ
58+
func cancelWeekday11AMNotification() {
59+
let weekdays = [2, 3, 4, 5, 6]
60+
61+
for weekday in weekdays {
62+
let identifier = "weekdayNotification-\(weekday)"
63+
let center = UNUserNotificationCenter.current()
64+
center.removePendingNotificationRequests(withIdentifiers: [identifier])
65+
}
66+
}
67+
68+
/// μ•± μ‹€ν–‰ μ‹œ μ•Œλ¦Ό λ°œμ†‘ κΆŒν•œμ„ μš”μ²­ν•˜λŠ” νŒμ—… 호좜 λ©”μ†Œλ“œ
69+
func requestNotificationPermission(completion: @escaping (_ granted: Bool) -> Void) {
70+
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) {
71+
granted, _ in
72+
completion(granted)
73+
}
74+
}
75+
76+
/// OS λ‹¨κ³„μ—μ„œ μ•Œλ¦Ό μˆ˜μ‹  섀정을 ν™•μΈν•˜λŠ” λ©”μ†Œλ“œ
77+
func checkNotificationSetting(completion: @escaping (_ setting: UNNotificationSettings) -> Void) {
78+
// ν˜„μž¬ UNUserNotificationCenter μΈμŠ€ν„΄μŠ€ κ°€μ Έμ˜€κΈ°
79+
let notificationCenter = UNUserNotificationCenter.current()
80+
81+
// μ•Œλ¦Ό 섀정을 λΉ„λ™κΈ°μ μœΌλ‘œ 확인
82+
notificationCenter.getNotificationSettings { settings in
83+
completion(settings)
84+
}
85+
}
7186
}

β€ŽEATSSU_MVC/EATSSU_MVC/Sources/Presentation/MyPage/Enum/MyPageLabels.swiftβ€Ž

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,24 @@ import Foundation
99

1010
/// "λ§ˆμ΄νŒŒμ΄μ§€"μ—μ„œ 확인할 수 μžˆλŠ” μ„œλΉ„μŠ€ 리슀트
1111
enum MyPageLabels : Int {
12-
13-
/// λ‚΄κ°€ μ“΄ 리뷰
14-
case MyReview = 0
15-
16-
/// λ¬Έμ˜ν•˜κΈ°
17-
case Inquiry
18-
19-
/// μ„œλΉ„μŠ€ μ΄μš©μ•½κ΄€
20-
case TermsOfUse
21-
22-
/// κ°œμΈμ •λ³΄ μ΄μš©μ•½κ΄€
23-
case PrivacyTermsOfUse
24-
25-
/// λ‘œκ·Έμ•„μ›ƒ
26-
case Logout
27-
28-
/// νƒˆν‡΄ν•˜κΈ°
29-
case Withdraw
30-
31-
/// λ§Œλ“ μ‚¬λžŒλ“€
32-
case Creator
33-
34-
/// 앱버전
35-
case AppVersion
12+
/// ν‘Έμ‹œ μ•Œλ¦Ό μ„€μ •
13+
case NotificationSetting = 0
14+
15+
/// λ‚΄κ°€ μ“΄ 리뷰
16+
case MyReview
17+
18+
/// λ¬Έμ˜ν•˜κΈ°
19+
case Inquiry
20+
21+
/// μ„œλΉ„μŠ€ μ΄μš©μ•½κ΄€
22+
case TermsOfUse
23+
24+
/// κ°œμΈμ •λ³΄ μ΄μš©μ•½κ΄€
25+
case PrivacyTermsOfUse
26+
27+
/// λ§Œλ“ μ‚¬λžŒλ“€
28+
case Creator
29+
30+
/// λ‘œκ·Έμ•„μ›ƒ
31+
case Logout
3632
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// MyPageLocalData.swift
3+
// EATSSU_MVC
4+
//
5+
// Created by Jiwoong CHOI on 9/19/24.
6+
//
7+
8+
import Foundation
9+
10+
// TODO: ꡬ쑰체에 μ΅μŠ€ν…μ…˜μœΌλ‘œ μ½”λ“œλ₯Ό μž‘μ„±ν•˜λŠ” μ΄μœ μ— λŒ€ν•΄μ„œ μ•Œμ•„λ³΄κΈ°
11+
12+
struct MyPageLocalData {
13+
let titleLabel: String
14+
}
15+
16+
extension MyPageLocalData {
17+
static let myPageTableLabelList = [
18+
19+
// "ν‘Έμ‹œ μ•Œλ¦Ό μ„€μ •"
20+
MyPageLocalData(titleLabel: TextLiteral.MyPage.pushNotificationSetting),
21+
22+
// "λ‚΄κ°€ μ“΄ 리뷰"
23+
MyPageLocalData(titleLabel: TextLiteral.MyPage.myReview),
24+
25+
// "λ¬Έμ˜ν•˜κΈ°"
26+
MyPageLocalData(titleLabel: TextLiteral.MyPage.inquiry),
27+
28+
// "μ„œλΉ„μŠ€ μ΄μš©μ•½κ΄€"
29+
MyPageLocalData(titleLabel: TextLiteral.MyPage.termsOfUse),
30+
31+
// "κ°œμΈμ •λ³΄ μ΄μš©μ•½κ΄€"
32+
MyPageLocalData(titleLabel: TextLiteral.MyPage.privacyTermsOfUse),
33+
34+
// "λ§Œλ“  μ‚¬λžŒλ“€"
35+
MyPageLocalData(titleLabel: TextLiteral.MyPage.creators),
36+
37+
// "λ‘œκ·Έμ•„μ›ƒ"
38+
MyPageLocalData(titleLabel: TextLiteral.MyPage.logout),
39+
]
40+
}

β€ŽEATSSU_MVC/EATSSU_MVC/Sources/Presentation/MyPage/Model/MyPageModel.swiftβ€Ž

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// MyPageRightItemData.swift
3+
// EATSSU_MVC
4+
//
5+
// Created by Jiwoong CHOI on 9/19/24.
6+
//
7+
8+
import Foundation
9+
10+
/// "λ§ˆμ΄νŽ˜μ΄μ§€"μ—μ„œ μ‚¬μš©ν•˜λŠ” μ…€μ˜ 였λ₯Έμͺ½ 데이터
11+
struct MyPageRightItemData {
12+
13+
/// μ•±μ˜ 배포 버전
14+
static var version: String? {
15+
if let info = Bundle.main.infoDictionary, let version = info["CFBundleShortVersionString"] as? String {
16+
return version
17+
} else {
18+
return nil
19+
}
20+
}
21+
}

β€ŽEATSSU_MVC/EATSSU_MVC/Sources/Presentation/MyPage/View/Cell/MyPageServiceCell.swiftβ€Ž

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
Β (0)