Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
32ec8ee
브랜치 테스트
Rrpe Feb 4, 2025
a1c1d5b
에러 수정 및 브랜치 테스트
Rrpe Feb 4, 2025
8d536fa
브랜치 변경 준비
Rrpe Feb 4, 2025
43456ec
메인 마지막 수정본 Pull
Rrpe Feb 4, 2025
7fc0965
Merge pull request #3 from APP-iOS7/leesugyeom
Rrpe Feb 4, 2025
c2d70c0
브랜치 전환
Rrpe Feb 5, 2025
ca72b32
메인 뷰 간단 작업
Rrpe Feb 5, 2025
aa3b258
알림 폴더 및 파일 추가
Rrpe Feb 5, 2025
99cccc1
NotificationManager 및 알림 설정TEST ver 0.1
Rrpe Feb 5, 2025
5c445fd
브랜치 스위치
Rrpe Feb 5, 2025
da15f83
브랜치 스위치
Rrpe Feb 5, 2025
1b96480
..
Rrpe Feb 5, 2025
8ceb17c
복구
Rrpe Feb 5, 2025
05c38bc
pull 전 커밋
Rrpe Feb 5, 2025
3c08e3e
충돌 해결
Rrpe Feb 5, 2025
5ca757c
앱 실행시 알림 권한 허용 및 알림 테스트 확인 완료 ver0.2
Rrpe Feb 5, 2025
ba70d48
스위치
Rrpe Feb 5, 2025
c75ba00
최신화 및 자동 알림 수정
Rrpe Feb 5, 2025
491c143
gitignore 추가
Rrpe Feb 5, 2025
dc30c7e
랜덤시간 알림 완료
Rrpe Feb 5, 2025
cf33b05
설정값에 따라 알림 갯수 오게끔 변경
Rrpe Feb 5, 2025
eb8c72a
더미 데이터 수정
Rrpe Feb 5, 2025
b286de6
MBTISelectionView 빌드 시 멈추던 문제 수정
Rrpe Feb 5, 2025
74294e5
MBTIProfile, MBTISelectionView 버그 발견, 대대적 공사 시작
Rrpe Feb 5, 2025
bd52ecb
버그 수정 완료
Rrpe Feb 5, 2025
cc3ed9a
버그 해결 완료
Rrpe Feb 5, 2025
1229678
알림 완료, MBTI 데이터 저장
Rrpe Feb 5, 2025
61b05b0
자기 전 마지막 커밋
Rrpe Feb 5, 2025
c976a74
스위치 전 푸시
Rrpe Feb 6, 2025
1b4fb6e
rollback
Rrpe Feb 6, 2025
21f2ee7
미션뷰 테스트 버튼으로 미션 뿌리기 성공 및 mbti셀렉션뷰 ui 변경
Rrpe Feb 6, 2025
0e5ab17
삭제 안되는 버그 수정 & 셀렉션 뷰 UI 다시 변경
Rrpe Feb 6, 2025
4471453
알림과 함께 미션 리스트에 뿌리기
Rrpe Feb 6, 2025
9c796b9
미션뷰와 미션디테일뷰 연동 완료
Rrpe Feb 6, 2025
f13ae9d
스위치전 커밋
Rrpe Feb 6, 2025
fbe8849
이그노어 추가
Rrpe Feb 6, 2025
32a8ab4
이그노어 수정 및 머지 전 마지막 커밋
Rrpe Feb 6, 2025
68c8d21
스위치
Rrpe Feb 6, 2025
61b74f6
스위치
Rrpe Feb 6, 2025
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.DS_Store
*.DS_Store

*.xcuserstate

*.xcodeproj
17 changes: 17 additions & 0 deletions Fix-MBTI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,22 @@
1E08C1EF2D5201820010F54C /* Fix-MBTI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Fix-MBTI.app"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
1E08C2202D52FF2D0010F54C /* Exceptions for "Fix-MBTI" folder in "Fix-MBTI" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
Info.plist,
);
target = 1E08C1EE2D5201820010F54C /* Fix-MBTI */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */

/* Begin PBXFileSystemSynchronizedRootGroup section */
1E08C1F12D5201820010F54C /* Fix-MBTI */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
1E08C2202D52FF2D0010F54C /* Exceptions for "Fix-MBTI" folder in "Fix-MBTI" target */,
);
path = "Fix-MBTI";
sourceTree = "<group>";
};
Expand Down Expand Up @@ -249,12 +262,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Fix-MBTI/Fix-MBTI.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Fix-MBTI/Preview Content\"";
DEVELOPMENT_TEAM = 59FP2PXRXK;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Fix-MBTI/Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand All @@ -278,12 +293,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "Fix-MBTI/Fix-MBTI.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Fix-MBTI/Preview Content\"";
DEVELOPMENT_TEAM = 59FP2PXRXK;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Fix-MBTI/Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>top-level-items</key>
<array>
<dict>
<key>destination</key>
<dict>
<key>rebasable-url</key>
<dict>
<key>base</key>
<string>workspace</string>
<key>payload</key>
<dict>
<key>relative-path</key>
<string>Fix-MBTI/Info.plist</string>
</dict>
</dict>
<key>type</key>
<string>DVTDocumentLocation</string>
</dict>
<key>type</key>
<string>bookmark</string>
</dict>
</array>
</dict>
</plist>
Binary file not shown.
8 changes: 8 additions & 0 deletions Fix-MBTI/Fix-MBTI.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
12 changes: 9 additions & 3 deletions Fix-MBTI/Fix_MBTIApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,26 @@ import SwiftData
@main
struct Fix_MBTIApp: App {
@AppStorage("isFirstLaunch") private var isFirstLaunch: Bool = true // 첫 실행인지 여부

var sharedModelContainer: ModelContainer = {
let schema = Schema([
Mission.self,
MBTIProfile.self,
ActiveMission.self,
])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)

do {
return try ModelContainer(for: schema, configurations: [modelConfiguration])
} catch {
fatalError("Could not create ModelContainer: \(error)")
}
}()


init() {
NotificationManager.instance.requestPermission() // 앱 실행 시 알림 권한 요청
}

var body: some Scene {
WindowGroup {
if isFirstLaunch {
Expand Down
12 changes: 12 additions & 0 deletions Fix-MBTI/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSUserNotificationUsageDescription</key>
<string>앱에서 알림을 보내기 위해 권한이 필요합니다.</string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
</dict>
</plist>
102 changes: 92 additions & 10 deletions Fix-MBTI/Model/Mission.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import SwiftData
@Model
final class Mission {
var title: String = "" // 미션 제목
var detailText: String = "" // 미션 설명
var detailText: String = "" // 게시물 텍스트
var timestamp: Date = Date() // 미션 생성 날짜
var randomTime: Date? = nil // 랜덤 타임
var imageName: String? = "" // 이미지 추가
var imageName: String? = "" // 게시물 이미지 추가
var category: String = ""

init(title: String, detailText: String, timestamp: Date = Date(), randomTime: Date? = nil, imageName: String? = nil, category: String) {
Expand All @@ -27,45 +27,127 @@ final class Mission {
}
}

// 더미 데이터
var missions: [Mission] = [
@Model
class ActiveMission {
var title: String
var detailText: String
var category: String
var timestamp: Date

init(mission: Mission) {
self.title = mission.title
self.detailText = mission.detailText
self.category = mission.category
self.timestamp = Date()
}
}

// 미션용 데이터
let missions: [Mission] = [
// 🔹 I(내향) → E(외향) 미션
Mission(title: "새로운 사람에게 먼저 인사하기", detailText: "3명에게 먼저 대화를 시도하세요.", category: "E"),
Mission(title: "모임에서 의견 말하기", detailText: "모임이나 회의에서 최소 1번은 의견을 말해보세요.", category: "E"),
Mission(title: "전화 대신 직접 만나기", detailText: "중요한 대화를 전화 대신 직접 만나서 해보세요.", category: "E"),
Mission(title: "사람 많은 곳에서 활동하기", detailText: "카페나 공원에서 1시간 이상 사람들과 함께 시간을 보내보세요.", category: "E"),
Mission(title: "새로운 그룹 활동 참여하기", detailText: "새로운 동호회나 그룹 활동에 참여해보세요.", category: "E"),

// 🔹 E(외향) → I(내향) 미션
Mission(title: "혼자만의 시간 보내기", detailText: "카페나 공원에서 혼자 조용히 시간을 보내보세요.", category: "I"),
Mission(title: "하루 동안 SNS 금지", detailText: "SNS를 하루 동안 사용하지 않고 자기 자신에게 집중하세요.", category: "I"),
Mission(title: "하루 동안 3명 이상과 연락하지 않기", detailText: "의식적으로 혼자만의 시간을 늘려보세요.", category: "I"),
Mission(title: "명상 10분 하기", detailText: "하루 10분간 조용한 공간에서 명상을 해보세요.", category: "I"),
Mission(title: "혼자 영화 감상하기", detailText: "혼자 영화를 보며 내면의 시간을 가져보세요.", category: "I"),

// 🔹 S(감각) → N(직관) 미션
Mission(title: "미래의 나에게 편지 쓰기", detailText: "5년 후의 나에게 편지를 써보세요.", category: "N"),
Mission(title: "창의적인 스토리 만들어보기", detailText: "즉흥적으로 짧은 이야기를 만들어보세요.", category: "N"),
Mission(title: "평소에 관심 없던 철학 책 읽기", detailText: "철학 또는 자기계발 서적을 10분 이상 읽어보세요.", category: "N"),

Mission(title: "기발한 아이디어 3개 적기", detailText: "창의적인 아이디어 3개를 떠올려서 적어보세요.", category: "N"),
Mission(title: "상상 속 여행 계획 세우기", detailText: "가보고 싶은 여행지를 설정하고 가상으로 여행 계획을 세워보세요.", category: "N"),

// 🔹 N(직관) → S(감각) 미션
Mission(title: "하루 동안 주변의 소리 기록하기", detailText: "하루 동안 들린 소리를 메모해보세요.", category: "S"),
Mission(title: "눈앞에 보이는 사물 세부 묘사하기", detailText: "지금 보이는 사물을 3가지 이상 자세히 설명해보세요.", category: "S"),
Mission(title: "지금까지 경험한 것 중 가장 현실적인 조언 적기", detailText: "논리적으로 타인에게 줄 수 있는 조언을 적어보세요.", category: "S"),

Mission(title: "자신이 좋아하는 장소의 디테일한 특징 적기", detailText: "좋아하는 장소를 구체적으로 묘사해보세요.", category: "S"),
Mission(title: "하루 동안 경험한 일 세부적으로 기록하기", detailText: "오늘 하루 동안 있었던 일을 가능한 한 자세히 기록해보세요.", category: "S"),

// 🔹 T(논리) → F(감성) 미션
Mission(title: "친구에게 감정 표현 문자 보내기", detailText: "감사의 표현이 담긴 메시지를 친구에게 보내보세요.", category: "F"),
Mission(title: "오늘 하루 감정 일기 쓰기", detailText: "하루 동안 느낀 감정을 일기에 기록하세요.", category: "F"),
Mission(title: "타인의 고민 듣고 공감해보기", detailText: "누군가의 고민을 듣고 공감을 표현해보세요.", category: "F"),

Mission(title: "좋아하는 노래 듣고 감정 표현하기", detailText: "감성적인 노래를 들으며 느낀 감정을 적어보세요.", category: "F"),
Mission(title: "하루 동안 긍정적인 말 3번 이상 하기", detailText: "하루 동안 주변 사람들에게 긍정적인 말을 세 번 이상 해보세요.", category: "F"),

// 🔹 F(감성) → T(논리) 미션
Mission(title: "데이터 기반으로 결정 내리기", detailText: "오늘 한 가지 결정을 데이터와 논리를 사용해 내려보세요.", category: "T"),
Mission(title: "감정이 아니라 논리로 주장해보기", detailText: "대화를 할 때 감정보다 논리를 중심으로 말해보세요.", category: "T"),
Mission(title: "객관적인 기사 읽고 요약하기", detailText: "뉴스나 과학 기사를 읽고 3줄로 요약해보세요.", category: "T"),

Mission(title: "통계 자료 분석해보기", detailText: "흥미로운 통계를 찾아 분석해보고 느낀 점을 정리하세요.", category: "T"),
Mission(title: "논리적 주장을 하는 토론 참여하기", detailText: "논리적으로 자신의 의견을 설명해야 하는 토론을 참여해보세요.", category: "T"),

// 🔹 J(계획) → P(즉흥) 미션
Mission(title: "즉흥적인 약속 잡기", detailText: "계획 없이 친구에게 연락해서 만나보세요.", category: "P"),
Mission(title: "하루 동안 미리 계획 없이 생활해보기", detailText: "일정을 정하지 않고 하루를 보내보세요.", category: "P"),
Mission(title: "음식 주문할 때 랜덤 선택하기", detailText: "메뉴를 고민하지 않고 즉흥적으로 골라보세요.", category: "P"),

Mission(title: "무작위 활동 선택해서 도전하기", detailText: "즉흥적으로 새로운 활동을 선택해서 실행해보세요.", category: "P"),
Mission(title: "예정 없이 길을 걸어보기", detailText: "목적 없이 길을 걸으며 새로운 길을 발견해보세요.", category: "P"),

// 🔹 P(즉흥) → J(계획) 미션
Mission(title: "내일 하루 계획 세우기", detailText: "내일 할 일을 아침에 미리 계획해보세요.", category: "J"),
Mission(title: "한 주의 목표 설정하기", detailText: "일주일 동안의 목표를 구체적으로 정리해보세요.", category: "J"),
Mission(title: "정해진 시간에 할 일 완료하기", detailText: "하나의 일을 정한 시간 안에 마무리해보세요.", category: "J")
Mission(title: "정해진 시간에 할 일 완료하기", detailText: "하나의 일을 정한 시간 안에 마무리해보세요.", category: "J"),
Mission(title: "월간 계획 세우기", detailText: "이번 달의 목표와 계획을 구체적으로 세워보세요.", category: "J"),
Mission(title: "시간 관리 앱 활용해보기", detailText: "시간 관리 앱을 사용해 하루 일정을 계획하고 기록해보세요.", category: "J")
]

@Model
class PostMission {
var title: String
var detailText: String
var content: String
var timestamp: Date
var imageName: String?
var category: String

init(mission: Mission, content: String) { // 생성자도 content 파라미터 추가
self.title = mission.title
self.detailText = mission.detailText
self.content = content // 입력된 내용 저장
self.timestamp = Date()
self.imageName = mission.imageName
self.category = mission.category
}
}

var dummyPosts: [Mission] = [
Mission(title: "새로운 사람에게 먼저 인사하기",
detailText: "처음 보는 사람에게 먼저 인사하는 게 어색했지만, 생각보다 기분이 좋았어요!",
timestamp: Date(timeIntervalSinceNow: -86400), // 하루 전
imageName: "smile_photo",
category: "E"),

Mission(title: "즉흥적인 약속 잡기",
detailText: "친구한테 갑자기 연락해서 만나자고 했는데, 정말 재밌었어요!",
timestamp: Date(timeIntervalSinceNow: -43200), // 반나절 전
imageName: "friend_meetup",
category: "E"),

Mission(title: "한적한 곳에서 조용히 명상하기",
detailText: "아무 생각 없이 10분 정도 명상했는데, 마음이 정리되는 느낌이었어요.",
timestamp: Date(timeIntervalSinceNow: -72000), // 20시간 전
imageName: nil,
category: "I"),

Mission(title: "즉흥적으로 여행 계획 세우기",
detailText: "급하게 여행 계획을 세우고 떠나봤는데, 예상보다 즐거운 경험이었어요!",
timestamp: Date(timeIntervalSinceNow: -172800), // 이틀 전
imageName: "travel_plan",
category: "P"),

Mission(title: "계획 없이 친구랑 만남 가지기",
detailText: "약속 없이 친구를 만나러 가니 새로운 경험이 되었어요!",
timestamp: Date(timeIntervalSinceNow: -36000), // 10시간 전
imageName: "random_meetup",
category: "P"),
]
Loading