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

[FEATURE] 탐색 화면 구현 #9

Merged
merged 29 commits into from
Sep 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0abea64
feat : 챌린지 탐색 화면 파일 생성
Sep 21, 2023
3450cc8
config : 커스텀 폰트 추가 및 데모 뷰 생성
Sep 21, 2023
9cfd526
config : 앱 아이콘 추가
Sep 21, 2023
0d85af9
config : 사용 디바이스 iOS로 수정
Sep 21, 2023
7298df1
feat : 탐색 Reducer 타입 구현
Sep 21, 2023
af91c6e
feat : 탐색 List 아이템 생성
Sep 21, 2023
32eda19
feat : 탐색 List 디테일 변경
Sep 21, 2023
b89431d
feat : 대기 챌린지 이동 메서드 추가
Sep 21, 2023
47139f2
fix : 대기 챌린지 리스트 화면 spacing 추가
Sep 21, 2023
7986b05
fix : 챌린지 필터 뷰 spacing 버그 수정
Sep 21, 2023
6cff34b
fix : 챌린지 리스트 뷰 레이아웃 변경
Sep 21, 2023
065f3c5
fix : 챌린지 리스트 뷰 레이아웃 꽉안차는 버그 수정
Sep 21, 2023
a4c517d
chore : 컨벤션 정리
Sep 22, 2023
53bbb3b
chore : 컨벤션 정리
Sep 22, 2023
de8f1f4
feat : 빈 챌린지 사용자 상호작용 액션 추가
Sep 22, 2023
a31003d
feat : 챌린지 참여 화면 구현
Sep 22, 2023
dc7ba35
feat : 챌린지 참가 화면 이동 메서드 구현
Sep 22, 2023
9fbc26c
feat : 빈 챌린지 화면 이동 구현중
Sep 22, 2023
2e47b5b
feat : 챌린지 참여 화면 이동 구현
Sep 22, 2023
5ade6d9
feat : 화면 전환시 progressview 나오도록 변경
Sep 22, 2023
4c84b01
feat : 챌린지 참여 화면 작은 뷰들로 쪼갬
Sep 22, 2023
a98b49c
feat : 커스텀 알람 화면 구현
Sep 22, 2023
051dd86
feat : 커스텀 알람 화면 center 맞춤
Sep 22, 2023
22a53ca
feat : 사용자 입장에 대한 메서드 구현
Sep 23, 2023
424e546
feat : 사용자 참가 후 화면 전환 구현
Sep 23, 2023
8e8e992
feat : 사용자 참가 후 화면 전환 구현
Sep 23, 2023
8bf2f8e
feat : 화면 내 존재하는 금액 및 시작 날짜 뷰 디테일 구현
Sep 23, 2023
98b6a99
feat : 챌린지 둘러보기 화면 뒤로가기 버튼 생성
Sep 23, 2023
620d121
feat : 챌린지 둘로보기 화면 뒤로가기 메서드 추가
Sep 23, 2023
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
148 changes: 129 additions & 19 deletions igoMoney/igoMoney.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions igoMoney/igoMoney/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
</array>
</dict>
</array>
<key>UIAppFonts</key>
<array>
<string>Pretendard-Black.otf</string>
<string>Pretendard-Bold.otf</string>
<string>Pretendard-ExtraBold.otf</string>
<string>Pretendard-ExtraLight.otf</string>
<string>Pretendard-Light.otf</string>
<string>Pretendard-Medium.otf</string>
<string>Pretendard-Regular.otf</string>
<string>Pretendard-SemiBold.otf</string>
<string>Pretendard-Thin.otf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"images" : [
{
"filename" : "app_icon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
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
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xF4",
"red" : "0xE5"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "icon_hand.svg",
"idiom" : "universal"
}
],
"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
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xD0",
"green" : "0xE7",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xDD",
"red" : "0xF2"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xE3",
"green" : "0xE5",
"red" : "0xFF"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xAE",
"green" : "0xFF",
"red" : "0xFD"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
72 changes: 36 additions & 36 deletions igoMoney/igoMoney/Source/App/igoMoneyApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,44 @@ import KakaoSDKCommon

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
return UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
}
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
return UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
}
}

class SceneDelegate: NSObject, UIWindowSceneDelegate {
var window: UIWindow?
var window: UIWindow?

func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let windowScene = scene as? UIWindowScene else { return }
window = UIWindow(windowScene: windowScene)
// let rootView = AuthScene(
// store: Store(
// initialState : AuthCore.State(),
// reducer: { AuthCore()._printChanges() }
// )
// )

func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let windowScene = scene as? UIWindowScene else { return }
window = UIWindow(windowScene: windowScene)
// let rootView = AuthScene(
// store: Store(
// initialState: AuthCore.State(),
// reducer: { AuthCore()._printChanges() }
// )
// )

let rootView = MainScene(
store: Store(
initialState: MainCore.State(),
reducer: { MainCore() }
)
)

KakaoSDK.initSDK(appKey: Bundle.main.kakaoNativeKey)
window?.rootViewController = UIHostingController(rootView: rootView)
window?.makeKeyAndVisible()
}
let rootView = MainScene(
store: Store(
initialState: MainCore.State(),
reducer: { MainCore()._printChanges() }
)
)

KakaoSDK.initSDK(appKey: Bundle.main.kakaoNativeKey)
window?.rootViewController = UIHostingController(rootView: rootView)
window?.makeKeyAndVisible()
}
}
124 changes: 62 additions & 62 deletions igoMoney/igoMoney/Source/AuthScene/AuthController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,82 +13,82 @@ import KakaoSDKUser

@MainActor
class AuthController: NSObject {
static let shared = AuthController()
static let shared = AuthController()

private var authToken: OAuthToken?

private init(authToken: OAuthToken? = nil) {
self.authToken = authToken
}

func authorizationWithApple() {
let IdRequest = ASAuthorizationAppleIDProvider().createRequest()
let passwordRequest = ASAuthorizationPasswordProvider().createRequest()
IdRequest.requestedScopes = [.fullName, .email]

private var authToken: OAuthToken?

private init(authToken: OAuthToken? = nil) {
self.authToken = authToken
}

func authorizationWithApple() {
let IdRequest = ASAuthorizationAppleIDProvider().createRequest()
let passwordRequest = ASAuthorizationPasswordProvider().createRequest()
IdRequest.requestedScopes = [.fullName, .email]

let controller = ASAuthorizationController(authorizationRequests: [IdRequest, passwordRequest])
controller.delegate = self
controller.presentationContextProvider = self
controller.performRequests()
}
let controller = ASAuthorizationController(authorizationRequests: [IdRequest, passwordRequest])
controller.delegate = self
controller.presentationContextProvider = self
controller.performRequests()
}
}

extension AuthController {
func authorizationWithKakao() async -> OAuthToken {
await withCheckedContinuation { continuation in
if UserApi.isKakaoTalkLoginAvailable() {
UserApi.shared.loginWithKakaoTalk { token, error in
guard let token = token else { return }

continuation.resume(returning: token)
}
} else {
UserApi.shared.loginWithKakaoAccount { token, error in
guard let token = token else { return }

continuation.resume(returning: token)
}
}
func authorizationWithKakao() async -> OAuthToken {
await withCheckedContinuation { continuation in
if UserApi.isKakaoTalkLoginAvailable() {
UserApi.shared.loginWithKakaoTalk { token, error in
guard let token = token else { return }

continuation.resume(returning: token)
}
} else {
UserApi.shared.loginWithKakaoAccount { token, error in
guard let token = token else { return }

continuation.resume(returning: token)
}
}
}
}
}

extension AuthController: ASAuthorizationControllerDelegate {
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
// Handling Apple Sign Error
print(error)
}

func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {
switch authorization.credential {
case let appleIdCredential as ASAuthorizationAppleIDCredential:
if let _ = appleIdCredential.email, let _ = appleIdCredential.fullName {
// Do Register New Account
} else {
// Do Register Exist Account
}

break

case let passwordCredential as ASPasswordCredential:
// SIgn In with User And Password

break

default:
break
}
func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {
// Handling Apple Sign Error
print(error)
}

func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {
switch authorization.credential {
case let appleIdCredential as ASAuthorizationAppleIDCredential:
if let _ = appleIdCredential.email, let _ = appleIdCredential.fullName {
// Do Register New Account
} else {
// Do Register Exist Account
}

break

case let passwordCredential as ASPasswordCredential:
// SIgn In with User And Password

break

default:
break
}
}
}

extension AuthController: ASAuthorizationControllerPresentationContextProviding {
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
return UIApplication.shared.topWindow() ?? ASPresentationAnchor()
}
func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor {
return UIApplication.shared.topWindow() ?? ASPresentationAnchor()
}
}

extension AuthController: ASWebAuthenticationPresentationContextProviding {
func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
return UIApplication.shared.topWindow() ?? ASPresentationAnchor()
}
func presentationAnchor(for session: ASWebAuthenticationSession) -> ASPresentationAnchor {
return UIApplication.shared.topWindow() ?? ASPresentationAnchor()
}
}
Loading