diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index d700f7fc..60ce07c3 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -1,77 +1,49 @@ -name: Create Jira Issue and Sync with GitHub +name: Create Branch from Issue on: issues: types: [opened] - push: - branches: - - 'feat/*' - - 'fix/*' - - 'docs/*' - - 'setting/*' - - 'add/*' - - 'refactor/*' - - 'chore/*' jobs: - create_jira_issue: - if: github.event_name == 'issues' + create_branch: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Create Jira issue - env: - JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} - JIRA_BASEURL: ${{ secrets.JIRA_BASEURL }} - JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }} - JIRA_PROJECT_KEY: ${{ secrets.JIRA_PROJECT_KEY }} + - name: Setup Git Config run: | - ISSUE_TITLE="${{ github.event.issue.title }}" - - JSON_DATA=$(jq -n \ - --arg key "$JIRA_PROJECT_KEY" \ - --arg summary "$ISSUE_TITLE" \ - '{ - "fields": { - "project": { - "key": $key - }, - "summary": $summary, - "description": "No description provided.", - "issuetype": { - "name": "Task" - } - } - }') - - echo "JSON Data: $JSON_DATA" - RESPONSE=$(curl -D- \ - -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \ - -X POST \ - --data "$JSON_DATA" \ - -H "Content-Type: application/json" \ - "$JIRA_BASEURL/rest/api/2/issue/") - echo "Jira API response: $RESPONSE" - JIRA_ISSUE_KEY=$(echo "$RESPONSE" | grep -oP '(?<=key\":\")\w+-\d+') - echo "JIRA_ISSUE_KEY=$JIRA_ISSUE_KEY" >> $GITHUB_ENV + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" - name: Create branch for the issue env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - export LANG=en_US.UTF-8 ISSUE_NUMBER=${{ github.event.issue.number }} ISSUE_TITLE="${{ github.event.issue.title }}" + # 접두사 추출 PREFIX=$(echo "$ISSUE_TITLE" | grep -oE '^(feat|fix|docs|setting|add|refactor|chore)') if [ -z "$PREFIX" ]; then PREFIX="feature"; fi - TITLE_NO_PREFIX=$(echo "$ISSUE_TITLE" | sed -e "s/$PREFIX : //") - CLEAN_TITLE=$(echo "$TITLE_NO_PREFIX" | iconv -c -f utf-8 -t ascii//TRANSLIT | sed 's/[^a-zA-Z0-9]//g') - BRANCH_NAME="${PREFIX}/#${ISSUE_NUMBER}-${CLEAN_TITLE}" + # 브랜치 이름 생성 + BRANCH_NAME="${PREFIX}/#${ISSUE_NUMBER}-$(echo "$ISSUE_TITLE" | iconv -c -f utf-8 -t ascii//TRANSLIT | sed 's/[^a-zA-Z0-9-]//g')" echo "Creating branch with name: $BRANCH_NAME" - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" + + git branch + git status + git checkout -b "$BRANCH_NAME" - git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}" "$BRANCH_NAME" + if [ $? -ne 0 ]; then + echo "Checkout to $BRANCH_NAME failed." + exit 1 + else + echo "Checkout to $BRANCH_NAME completed." + fi + + git push --set-upstream "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}" "$BRANCH_NAME" + if [ $? -ne 0 ]; then + echo "Failed to push branch $BRANCH_NAME" + exit 1 + else + echo "Pushed $BRANCH_NAME successfully." diff --git a/.gitignore b/.gitignore index 95ce5ce3..381df4ca 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,6 @@ .AppleDouble .LSOverride -# Icon must end with two \r -Icon - # Thumbnails ._* diff --git a/KkuMulKum.xcodeproj/project.pbxproj b/KkuMulKum.xcodeproj/project.pbxproj index 1162e38e..a4bb567e 100644 --- a/KkuMulKum.xcodeproj/project.pbxproj +++ b/KkuMulKum.xcodeproj/project.pbxproj @@ -55,6 +55,7 @@ 78B9286E2C29402C006D9942 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78B9286D2C29402C006D9942 /* SceneDelegate.swift */; }; 78B928752C29402E006D9942 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78B928742C29402E006D9942 /* Assets.xcassets */; }; 78B928782C29402E006D9942 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 78B928762C29402E006D9942 /* LaunchScreen.storyboard */; }; + DD865B642C3920F000C351A2 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD865B632C3920F000C351A2 /* LoginViewController.swift */; }; DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */; }; DDA2EE752C385FB1007C6059 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE742C385FB1007C6059 /* HomeViewController.swift */; }; DDA2EE772C385FC3007C6059 /* GroupListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDA2EE762C385FC3007C6059 /* GroupListViewController.swift */; }; @@ -95,6 +96,7 @@ 78B928742C29402E006D9942 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 78B928772C29402E006D9942 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 78B928792C29402E006D9942 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DD865B632C3920F000C351A2 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; DDA2EE722C385EB9007C6059 /* MainTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarController.swift; sourceTree = ""; }; DDA2EE742C385FB1007C6059 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; DDA2EE762C385FC3007C6059 /* GroupListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupListViewController.swift; sourceTree = ""; }; @@ -210,6 +212,22 @@ path = KkuMulKum; sourceTree = ""; }; + DD865B652C3920F600C351A2 /* Onboarding */ = { + isa = PBXGroup; + children = ( + DD865B662C39210E00C351A2 /* Login */, + ); + path = Onboarding; + sourceTree = ""; + }; + DD865B662C39210E00C351A2 /* Login */ = { + isa = PBXGroup; + children = ( + DD865B632C3920F000C351A2 /* LoginViewController.swift */, + ); + path = Login; + sourceTree = ""; + }; DDA2EE7B2C386078007C6059 /* Home */ = { isa = PBXGroup; children = ( @@ -258,6 +276,7 @@ DDA2EE7B2C386078007C6059 /* Home */, DDA2EE7C2C38607F007C6059 /* GroupList */, DDA2EE7D2C386087007C6059 /* MyPage */, + DD865B652C3920F600C351A2 /* Onboarding */, ); path = Source; sourceTree = ""; @@ -482,6 +501,7 @@ DED5DBF22C34534A006ECE7E /* BaseCollectionReusableView.swift in Sources */, DED5DBEC2C345210006ECE7E /* BaseViewController.swift in Sources */, DDA2EE732C385EB9007C6059 /* MainTabBarController.swift in Sources */, + DD865B642C3920F000C351A2 /* LoginViewController.swift in Sources */, DE254AAC2C31192400A4015E /* UILabel+.swift in Sources */, DE254AB72C3119D000A4015E /* ReuseIdentifiable.swift in Sources */, DDA2EE752C385FB1007C6059 /* HomeViewController.swift in Sources */, diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/Contents.json new file mode 100644 index 00000000..febf0aa1 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "back.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/back.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/back.svg new file mode 100644 index 00000000..f10806c1 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_back.imageset/back.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/Contents.json new file mode 100644 index 00000000..e1ec8fc4 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "camera.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/camera.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/camera.svg new file mode 100644 index 00000000..b4c8b216 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_camera.imageset/camera.svg @@ -0,0 +1,4 @@ + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/Contents.json new file mode 100644 index 00000000..b09981a2 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "check.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/check.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/check.svg new file mode 100644 index 00000000..a273a039 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_check.imageset/check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/Contents.json new file mode 100644 index 00000000..3ca6fb89 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "date.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/date.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/date.svg new file mode 100644 index 00000000..438bc979 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_date.imageset/date.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/Contents.json new file mode 100644 index 00000000..22b685c7 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "delete.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/delete.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/delete.svg new file mode 100644 index 00000000..b6677a63 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_delete.imageset/delete.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/Contents.json new file mode 100644 index 00000000..fe13666d --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "deleteDark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/deleteDark.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/deleteDark.svg new file mode 100644 index 00000000..2c14a611 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_deleteDark.imageset/deleteDark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/Contents.json new file mode 100644 index 00000000..91a354c5 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "group.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/group.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/group.svg new file mode 100644 index 00000000..f19c3734 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_group.imageset/group.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/Contents.json new file mode 100644 index 00000000..fb9b4d62 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "groupPlus.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/groupPlus.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/groupPlus.svg new file mode 100644 index 00000000..d31a2cb0 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_groupPlus.imageset/groupPlus.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/Contents.json new file mode 100644 index 00000000..53ea4d56 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "home.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/home.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/home.svg new file mode 100644 index 00000000..b83e17f0 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_home.imageset/home.svg @@ -0,0 +1,4 @@ + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/Contents.json new file mode 100644 index 00000000..9b575b9a --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "my.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/my.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/my.svg new file mode 100644 index 00000000..b97f9844 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_my.imageset/my.svg @@ -0,0 +1,4 @@ + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/Contents.json new file mode 100644 index 00000000..710c790a --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "penalty.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/penalty.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/penalty.svg new file mode 100644 index 00000000..aca63049 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_penalty.imageset/penalty.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/Contents.json new file mode 100644 index 00000000..3b4d0760 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "pin.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/pin.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/pin.svg new file mode 100644 index 00000000..97d5cb46 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_pin.imageset/pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/Contents.json new file mode 100644 index 00000000..a23b7466 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "plus.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/plus.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/plus.svg new file mode 100644 index 00000000..33d55c1d --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plus.imageset/plus.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/Contents.json new file mode 100644 index 00000000..7324db90 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "plusDark.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/plusDark.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/plusDark.svg new file mode 100644 index 00000000..aa575ceb --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_plusDark.imageset/plusDark.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/Contents.json new file mode 100644 index 00000000..a3a8077c --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "right.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/right.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/right.svg new file mode 100644 index 00000000..c3a613e3 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_right.imageset/right.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/Contents.json new file mode 100644 index 00000000..4a3f4dab --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "search.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/search.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/search.svg new file mode 100644 index 00000000..40f0b9c6 --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_search.imageset/search.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/Contents.json b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/Contents.json new file mode 100644 index 00000000..d07b012f --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "time.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/time.svg b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/time.svg new file mode 100644 index 00000000..a3b0373c --- /dev/null +++ b/KkuMulKum/Resource/Assets.xcassets/Icon/icon_time.imageset/time.svg @@ -0,0 +1,3 @@ + + + diff --git a/KkuMulKum/Resource/Color.xcassets/orange.colorset/Contents.json b/KkuMulKum/Resource/Color.xcassets/mainorange.colorset/Contents.json similarity index 100% rename from KkuMulKum/Resource/Color.xcassets/orange.colorset/Contents.json rename to KkuMulKum/Resource/Color.xcassets/mainorange.colorset/Contents.json diff --git a/KkuMulKum/Resource/Color.xcassets/red.colorset/Contents.json b/KkuMulKum/Resource/Color.xcassets/mainred.colorset/Contents.json similarity index 100% rename from KkuMulKum/Resource/Color.xcassets/red.colorset/Contents.json rename to KkuMulKum/Resource/Color.xcassets/mainred.colorset/Contents.json diff --git a/KkuMulKum/Source/GroupList/GroupListViewController.swift b/KkuMulKum/Source/GroupList/GroupListViewController.swift index 537982a5..027d6c5a 100644 --- a/KkuMulKum/Source/GroupList/GroupListViewController.swift +++ b/KkuMulKum/Source/GroupList/GroupListViewController.swift @@ -7,7 +7,7 @@ import UIKit -class GroupListViewController: UIViewController { +class GroupListViewController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() diff --git a/KkuMulKum/Source/Home/HomeViewController.swift b/KkuMulKum/Source/Home/HomeViewController.swift index 87262151..c077acd2 100644 --- a/KkuMulKum/Source/Home/HomeViewController.swift +++ b/KkuMulKum/Source/Home/HomeViewController.swift @@ -7,7 +7,8 @@ import UIKit -class HomeViewController: UIViewController { + +class HomeViewController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() diff --git a/KkuMulKum/Source/MyPage/MyPageViewController.swift b/KkuMulKum/Source/MyPage/MyPageViewController.swift index b39252dc..73f1ea54 100644 --- a/KkuMulKum/Source/MyPage/MyPageViewController.swift +++ b/KkuMulKum/Source/MyPage/MyPageViewController.swift @@ -7,7 +7,7 @@ import UIKit -class MyPageViewController: UIViewController { +class MyPageViewController: BaseViewController { override func viewDidLoad() { super.viewDidLoad() diff --git a/KkuMulKum/Source/Onboarding/Login/LoginViewController.swift b/KkuMulKum/Source/Onboarding/Login/LoginViewController.swift new file mode 100644 index 00000000..7c410abc --- /dev/null +++ b/KkuMulKum/Source/Onboarding/Login/LoginViewController.swift @@ -0,0 +1,67 @@ +// +// LoginViewController.swift +// KkuMulKum +// +// Created by YOUJIM on 7/6/24. +// + +import UIKit +import AuthenticationServices + + +class LoginViewController: BaseViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + self.navigationController?.navigationBar.isHidden = true + view.backgroundColor = .yellow + setupAppleLoginButton() + } + + func setupAppleLoginButton() { + let button = ASAuthorizationAppleIDButton() + button.addTarget(self, action: #selector(clickAppleLogin), for: .touchUpInside) + button.frame = CGRect(x: 100, y: 100, width: 200, height: 40) + view.addSubview(button) + } + + @objc func clickAppleLogin() { + let request = ASAuthorizationAppleIDProvider().createRequest() + request.requestedScopes = [.fullName, .email] + + let controller = ASAuthorizationController(authorizationRequests: [request]) + controller.delegate = self + controller.presentationContextProvider = self + controller.performRequests() + } +} + + +// MARK: - ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding + +extension LoginViewController: ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding { + func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { + if let credential = authorization.credential as? ASAuthorizationAppleIDCredential { + let idToken = credential.identityToken! + let tokenStr = String(data: idToken, encoding: .utf8) + print(tokenStr ?? "No token string") + + guard let code = credential.authorizationCode else { return } + let codeStr = String(data: code, encoding: .utf8) + print(codeStr ?? "No code string") + + let user = credential.user + print(user) + } + } + + func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { + print("Authorization failed with error: \(error)") + } + + func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor { + return self.view.window! + } + +}