Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2.1.0.1] TestFlight 업로드 #64

Merged
merged 42 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
43e5f87
Merge branch 'develop' into feat/#1-time-based-notification
jayn2u Sep 11, 2024
e2a630c
Merge branch 'develop' into feat/#1-time-based-notification
jayn2u Sep 12, 2024
66566ed
[Feat] yml 파일 세팅
jayn2u Sep 13, 2024
f311382
Merge branch 'fix/#39' into cd-automation
jayn2u Sep 13, 2024
78c3866
[Feat] Tuist 설치 명령어 입력
jayn2u Sep 13, 2024
207b153
[Feat] 의존성 설치 명령어 입력
jayn2u Sep 13, 2024
2b65278
[Feat] Configuration 파일 배치
jayn2u Sep 13, 2024
21f7585
Merge branch 'develop' into cd-automation
jayn2u Sep 13, 2024
3f02ad9
[Feat] 파일 위치 디버그
jayn2u Sep 13, 2024
c7af88d
[Feat] Configuration 파일 생성 스크립트 재작성
jayn2u Sep 13, 2024
c8d8668
[Feat] cat & mv 명령어 추가
jayn2u Sep 13, 2024
a0e4635
[Feat] tuist-action 추가
jayn2u Sep 13, 2024
96d6031
[Feat] tuist 공식 CI 코드 추가
jayn2u Sep 13, 2024
396f41b
[Feat] Debug.xcconfig 파일 추가
jayn2u Sep 13, 2024
023fb3a
[Feat] GitHub Action 세분화
jayn2u Sep 13, 2024
a25d3b0
[Feat] qa 브랜치 추가
jayn2u Sep 13, 2024
1d0de2c
[Feat] 지속적 통합 워크플로우 구축
jayn2u Sep 13, 2024
d4bfdfe
[Feat] cicd 설계 테스트 워크플로우 생성
jayn2u Sep 13, 2024
2a88a70
[Feat] Tuist 설치 명령어 제거
jayn2u Sep 13, 2024
1e8deec
Merge branch 'develop' into cicd-automation
jayn2u Sep 14, 2024
b900e65
[#48] XCTest 프레임워크 기본 설정 구축
jayn2u Sep 14, 2024
5f0107a
[#48] Fastlane으로 스크린샷 촬영 자동화
jayn2u Sep 14, 2024
41da02e
[#48] Fastlane 도입
jayn2u Sep 15, 2024
7d67d7e
[#48] Install fastlane via ruby
jayn2u Sep 15, 2024
7c718c9
[#48] Specify Testing Device
jayn2u Sep 15, 2024
652ce3e
[#48] develop에서 qa로 CI 대상 브랜치 변경
jayn2u Sep 15, 2024
1dc70e4
[#48] Tuist test 명령어 제거 & Fastlane test 유효성 검사
jayn2u Sep 15, 2024
e820599
[#48] 누락된 lane tests 명령어 기입
jayn2u Sep 15, 2024
074163e
[#48] faslane tests 간 디바이스 명시
jayn2u Sep 15, 2024
79c567c
[#48] Fastlane 설치 스크립트 작성
jayn2u Sep 15, 2024
bbf26f6
[#48] EATSSUTests 클래스만 추가
jayn2u Sep 15, 2024
93c6dc4
Merge pull request #51 from EAT-SSU/feat/#50
jayn2u Sep 15, 2024
cfda173
Merge branch 'develop' into cicd-automation
jayn2u Sep 15, 2024
d83f9d0
[#55] 스낵코너 메뉴목록 활성화
CJiu01 Sep 16, 2024
2663401
[#55] 푸드코트 테이블 제거
CJiu01 Sep 16, 2024
c6a92d6
Merge pull request #60 from EAT-SSU/fix/#55
CJiu01 Sep 16, 2024
8c15035
Merge branch 'develop' into feat/#1-time-based-notification
jayn2u Sep 16, 2024
af14aff
Merge branch 'feat/#48' into feat/#1-time-based-notification
jayn2u Sep 16, 2024
f43fc16
[#1] 시간 기반 알림 기능 설계
jayn2u Sep 16, 2024
89b2be1
Merge pull request #62 from EAT-SSU/feat/#48
jayn2u Sep 16, 2024
b7eaefd
Merge branch 'develop' into feat/#1-time-based-notification
jayn2u Sep 16, 2024
7b0ea73
Merge pull request #63 from EAT-SSU/feat/#1-time-based-notification
jayn2u Sep 16, 2024
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
60 changes: 60 additions & 0 deletions .github/workflows/cicd-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI/CD Automation Tests

on:
push:
branches:
- cicd-automation

jobs:
CICD_Automation_Tests:
runs-on: macos-latest
environment: Configuration Files
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0

- name: Install Fastlane
run: |
gem install fastlane

- name: Install Ruby Dependencies
run: |
bundle install

- name: Create Release & Debug Configuration Files
env:
BASE_URL: ${{ secrets.BASE_URL }}
KAKAO_API_KEY: ${{ secrets.KAKAO_API_KEY }}
run: |
echo "// Configuration settings file format documentation can be found at:" > Release.xcconfig
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Release.xcconfig
echo "// API 엔드 포인트 주소" >> Release.xcconfig
echo "BASE_URL = $BASE_URL" >> Release.xcconfig
echo "// 카카오 API 키" >> Release.xcconfig
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Release.xcconfig
cat Release.xcconfig
mv Release.xcconfig EATSSU_MVC/EATSSU_MVC/Resources

echo "// Configuration settings file format documentation can be found at:" > Debug.xcconfig
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Debug.xcconfig
echo "// API 엔드 포인트 주소" >> Debug.xcconfig
echo "BASE_URL = $BASE_URL" >> Debug.xcconfig
echo "// 카카오 API 키" >> Debug.xcconfig
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Debug.xcconfig
cat Debug.xcconfig
mv Debug.xcconfig EATSSU_MVC/EATSSU_MVC/Resources

- name: Install Dependencies
run: |
tuist install

- name: Build Project
run: |
tuist build

- name: Run Tests via Fastlane
run: |
fastlane tests
49 changes: 49 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Continuous Integration

on:
pull_request:
branches:
- qa

jobs:
Continuous_Integration:
runs-on: macos-latest
environment: Configuration Files
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2

- name: Install Tuist
run: |
bash <(curl -Ls https://install.tuist.io)

- name: Create Release & Debug Configuration Files
env:
BASE_URL: ${{ secrets.BASE_URL }}
KAKAO_API_KEY: ${{ secrets.KAKAO_API_KEY }}
run: |
echo "// Configuration settings file format documentation can be found at:" > Release.xcconfig
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Release.xcconfig
echo "// API 엔드 포인트 주소" >> Release.xcconfig
echo "BASE_URL = $BASE_URL" >> Release.xcconfig
echo "// 카카오 API 키" >> Release.xcconfig
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Release.xcconfig
cat Release.xcconfig
mv Release.xcconfig EATSSU_MVC/EATSSU_MVC/Resources

echo "// Configuration settings file format documentation can be found at:" > Debug.xcconfig
echo "// https://help.apple.com/xcode/#/dev745c5c974" >> Debug.xcconfig
echo "// API 엔드 포인트 주소" >> Debug.xcconfig
echo "BASE_URL = $BASE_URL" >> Debug.xcconfig
echo "// 카카오 API 키" >> Debug.xcconfig
echo "KAKAO_API_KEY = $KAKAO_API_KEY" >> Debug.xcconfig
cat Debug.xcconfig
mv Debug.xcconfig EATSSU_MVC/EATSSU_MVC/Resources

- name: Install Dependencies
run: |
tuist install

- name: Build Project
run: |
tuist build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@ Tuist/.build

### Configurtion files ###
*.xcconfig
*.plist
*.plist

### Fastlane ###
fastlane/screenshots
fastlane/test_output
108 changes: 54 additions & 54 deletions EATSSU_MVC/EATSSU_MVC/Sources/Notification/NotificationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,63 @@ import Foundation
import UserNotifications

class NotificationManager {
static let shared = NotificationManager()

/// 지정된 시간에 알림을 발송하는 메소드
func scheduleHelloWorldNotification() {
let content = UNMutableNotificationContent()
content.title = "Hello World"
content.body = "11시가 되었습니다!"
content.sound = .default

var dateComponents = DateComponents()
dateComponents.hour = 11
dateComponents.minute = 0

let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)

let request = UNNotificationRequest(identifier: "helloWorldNotification", content: content, trigger: trigger)

UNUserNotificationCenter.current().add(request) { error in
if let error = error {
print("Hello World 알림 예약 실패: \(error.localizedDescription)")
} else {
print("Hello World 알림이 성공적으로 예약되었습니다.")
}

// MARK: - Properties

static let shared = NotificationManager()

// MARK: - Methods

/// 평일 11시에 앱의 유입을 유도하는 알림을 발송하는 메소드
///
/// - Title : 🤔 오늘 밥 뭐 먹지…
/// - Body : 오늘의 학식을 확인해보세요!
func scheduleWeekday11AMNotification() {
let center = UNUserNotificationCenter.current()

// 알림 콘텐츠 설정
let content = UNMutableNotificationContent()

content.title = TextLiteral.Notification.dailyWeekdayNotificationTitle
content.body = TextLiteral.Notification.dailyWeekdayNotificationBody
content.sound = .default

// 반복할 요일 및 시간 설정 (평일 오전 11시)
let calendar = Calendar.current
let weekdays = [2, 3, 4, 5, 6] // 월, 화, 수, 목, 금 (Calendar에서 1이 일요일)

for weekday in weekdays {
var dateComponents = DateComponents()
dateComponents.hour = 11
dateComponents.minute = 0
dateComponents.weekday = weekday

let trigger = UNCalendarNotificationTrigger(dateMatching: dateComponents, repeats: true)

// 고유한 식별자를 위해 weekday를 사용
let identifier = "weekdayNotification-\(weekday)"
let request = UNNotificationRequest(
identifier: identifier, content: content, trigger: trigger)

// 알림 등록
center.add(request) { error in
if let error = error {
print("알림 등록 간 에러 메시지: \(error.localizedDescription)")
}
}
}

}

/// 앱 실행 시 알림 발송 권한을 요청하는 팝업 호출 메소드
func requestAuthorization() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
if granted {
print("알림 권한 승인됨")
} else {
print("알림 권한 거부됨")
}
}
}

/// 개발자 도구 : 시뮬레이터에서 지속적으로 알림을 확인하기 위한 메소드
///
/// 해당 메소드는 배포 시 호출되면 안됩니다.
func scheduleTestNotification() {
let content = UNMutableNotificationContent()
content.title = "Hello World"
content.body = "테스트 알림입니다!"
content.sound = .default

// 3초 후에 알림 발생
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 60, repeats: true)

let request = UNNotificationRequest(identifier: "testNotification", content: content, trigger: trigger)

UNUserNotificationCenter.current().add(request) { error in
if let error = error {
print("테스트 알림 예약 실패: \(error.localizedDescription)")
} else {
print("테스트 알림이 성공적으로 예약되었습니다.")
}
func requestNotificationPermission() {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) {
granted, error in
if granted {
print("알림 권한 승인됨")
} else {
print("알림 권한 거부됨")
}
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ final class HomeRestaurantViewController: BaseViewController {
private let sectionHeaderRestaurant = [TextLiteral.dormitoryRestaurant,
TextLiteral.dodamRestaurant,
TextLiteral.studentRestaurant,
TextLiteral.foodCourt,
TextLiteral.snackCorner]
let restaurantButtonTitleToName = [TextLiteral.dormitoryRestaurant: "DORMITORY",
TextLiteral.dodamRestaurant: "DODAM",
TextLiteral.studentRestaurant: "HAKSIK",
TextLiteral.foodCourt: "FOOD_COURT",
TextLiteral.snackCorner: "SNACK_CORNER"]
var currentRestaurant = ""
var isWeekend = false
Expand Down Expand Up @@ -112,7 +110,6 @@ final class HomeRestaurantViewController: BaseViewController {
let restaurantRawValue = [TextLiteral.dormitoryRawValue,
TextLiteral.dodamRawValue,
TextLiteral.studentRestaurantRawValue,
TextLiteral.foodCourtRawValue,
TextLiteral.snackCornerRawValue]
return restaurantRawValue.firstIndex(of: restaurant)
}
Expand All @@ -121,7 +118,6 @@ final class HomeRestaurantViewController: BaseViewController {
let restaurantRawValue = [TextLiteral.dormitoryRawValue,
TextLiteral.dodamRawValue,
TextLiteral.studentRestaurantRawValue,
TextLiteral.foodCourtRawValue,
TextLiteral.snackCornerRawValue]
return restaurantRawValue[section]
}
Expand All @@ -138,13 +134,10 @@ final class HomeRestaurantViewController: BaseViewController {
if time == TextLiteral.lunchRawValue {

if !weekday.isWeekend {
getFixMenuData(restaurant: TextLiteral.foodCourtRawValue) {}
// getFixMenuData(restaurant: TextLiteral.snackCornerRawValue) {}
getFixMenuData(restaurant: TextLiteral.snackCornerRawValue) {}
} else {
currentRestaurant = TextLiteral.foodCourtRawValue
self.fixMenuTableViewData[TextLiteral.foodCourtRawValue] = [MenuInformation(menuId: 0, name: "", mainRating: nil, price: nil)]
// currentRestaurant = TextLiteral.snackCornerRawValue
// self.fixMenuTableViewData[TextLiteral.snackCornerRawValue] = [MenuInformation(menuId: 0, name: "", mainRating: nil, price: nil)]
currentRestaurant = TextLiteral.snackCornerRawValue
self.fixMenuTableViewData[TextLiteral.snackCornerRawValue] = [MenuInformation(menuId: 0, name: "", mainRating: nil, price: nil)]
}
}
}
Expand Down Expand Up @@ -200,17 +193,6 @@ extension HomeRestaurantViewController: UITableViewDataSource {
cell.model = .change(data)
}
} else if indexPath.section == 3 {
if let data = fixMenuTableViewData[TextLiteral.foodCourtRawValue]?[indexPath.row - restaurantTableViewMenuTitleCellCount] {
if data.price != nil {
isSelectable = true
cell.model = .fix(data)
cell.selectionStyle = .default
} else {
isSelectable = false
cell.selectionStyle = .none
}
}
} else if indexPath.section == 4 {
if let data = fixMenuTableViewData[TextLiteral.snackCornerRawValue]?[indexPath.row - restaurantTableViewMenuTitleCellCount] {
if data.price != nil {
isSelectable = true
Expand Down
Loading
Loading