From 3066252002c3c1e92b593d6483bcdc59791bba6c Mon Sep 17 00:00:00 2001 From: a06246 Date: Tue, 16 Dec 2025 15:32:50 +0900 Subject: [PATCH] build v2 --- .easignore | 63 +++++++++++++++++++ app.json | 32 +++++++--- eas.json | 9 +++ src/components/ExerciseSetItem.tsx | 13 ++-- src/screens/auth/LoginScreen.tsx | 84 +------------------------ src/screens/exercise/ExerciseScreen.tsx | 51 ++++++++++----- 6 files changed, 136 insertions(+), 116 deletions(-) create mode 100644 .easignore diff --git a/.easignore b/.easignore new file mode 100644 index 0000000..8e433bf --- /dev/null +++ b/.easignore @@ -0,0 +1,63 @@ +# Git +.git/ +.gitignore +.gitattributes + +# Documentation +README.md +*.md + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Testing +coverage/ +.nyc_output/ + +# Temporary files +*.tmp +*.temp +.cache/ + +# Expo +.expo/ +.expo-shared/ +dist/ +web-build/ + +# Build artifacts +build/ +*.apk +*.aab +*.ipa + +# Environment files (keep .env.example if needed) +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Misc +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision +*.orig.* + + + diff --git a/app.json b/app.json index 1e26c50..2305345 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Intelfit", "slug": "intelfit-mobile", - "version": "1.0.0", + "version": "2.0.0", "orientation": "portrait", "scheme": "intelfit", "splash": { @@ -38,7 +38,10 @@ "pathPrefix": "/auth/kakao" } ], - "category": ["BROWSABLE", "DEFAULT"] + "category": [ + "BROWSABLE", + "DEFAULT" + ] }, { "action": "VIEW", @@ -47,7 +50,10 @@ "scheme": "intelfit" } ], - "category": ["BROWSABLE", "DEFAULT"] + "category": [ + "BROWSABLE", + "DEFAULT" + ] }, { "action": "VIEW", @@ -57,16 +63,24 @@ "host": "oauth" } ], - "category": ["BROWSABLE", "DEFAULT"] + "category": [ + "BROWSABLE", + "DEFAULT" + ] } - ] + ], + "config": { + "googleMaps": { + "apiKey": "" + } + } }, "extra": { + "kakaoAppKey": "b46c5ece88946636902899138451ac5e", "eas": { - "projectId": "e2d68caa-2c28-42d1-9faf-6a52d4016dda" - }, - "kakaoAppKey": "b46c5ece88946636902899138451ac5e" + "projectId": "0f452949-f695-45d7-88d7-a695b910e551" + } }, - "owner": "intelfit" + "owner": "a06246" } } diff --git a/eas.json b/eas.json index bacdcf5..dfd61ad 100644 --- a/eas.json +++ b/eas.json @@ -8,17 +8,26 @@ "distribution": "internal", "android": { "buildType": "apk" + }, + "cache": { + "disabled": false } }, "preview": { "distribution": "internal", "android": { "buildType": "apk" + }, + "cache": { + "disabled": false } }, "production": { "android": { "buildType": "app-bundle" + }, + "cache": { + "disabled": false } } }, diff --git a/src/components/ExerciseSetItem.tsx b/src/components/ExerciseSetItem.tsx index 1ec290f..1c5b815 100644 --- a/src/components/ExerciseSetItem.tsx +++ b/src/components/ExerciseSetItem.tsx @@ -246,17 +246,17 @@ const styles = StyleSheet.create({ justifyContent: "flex-end", backgroundColor: "#F8F8F8", borderRadius: 10, - paddingHorizontal: 12, - paddingVertical: 10, + paddingHorizontal: 8, + paddingVertical: 8, borderWidth: 1, borderColor: "#E0E0E0", width: "100%", }, valueInput: { - fontSize: 16, + fontSize: 15, fontWeight: "600", textAlign: "right", - width: 50, + width: 40, padding: 0, color: "#000000", }, @@ -267,11 +267,10 @@ const styles = StyleSheet.create({ color: "#4CAF50", }, unit: { - fontSize: 14, + fontSize: 13, fontWeight: "600", - marginLeft: 6, + marginLeft: 4, color: "#666666", - width: 24, }, textDefault: { color: "#000000", diff --git a/src/screens/auth/LoginScreen.tsx b/src/screens/auth/LoginScreen.tsx index 6419db2..1ce253b 100644 --- a/src/screens/auth/LoginScreen.tsx +++ b/src/screens/auth/LoginScreen.tsx @@ -388,89 +388,7 @@ const LoginScreen = ({ navigation }: any) => { return; } - // ✅ 방법 1: @react-native-seoul/kakao-login 사용 (네이티브 빌드에서만 작동) - if (KakaoLogin && typeof KakaoLogin.login === "function") { - try { - console.log("🔵 [카카오 로그인] 네이티브 모듈 사용"); - const token = await KakaoLogin.login(); - console.log("✅ [카카오 로그인] 토큰 받음:", token); - - // 카카오 액세스 토큰을 백엔드로 전송하여 JWT 토큰 발급받기 - // 또는 카카오 프로필 정보를 가져와서 백엔드에 전송 - const profile = await KakaoLogin.getProfile(); - console.log("✅ [카카오 로그인] 프로필:", profile); - - // 백엔드 API 호출 (카카오 ID로 로그인/회원가입) - console.log("🔵 [카카오 로그인] 백엔드 API 호출 시작"); - const res = await fetch( - "https://www.intelfits.com/api/auth/kakao/login", - { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - kakaoAccessToken: token.accessToken, - kakaoId: profile.id, - nickname: profile.nickname, - profileImage: profile.profileImageUrl, - }), - } - ); - - console.log("🔵 [카카오 로그인] 백엔드 응답 상태:", res.status); - const data = await res.json(); - console.log("🔵 [카카오 로그인] 백엔드 응답 데이터:", data); - - if (!res.ok) { - console.error("❌ [카카오 로그인] 백엔드 응답 실패:", { - status: res.status, - statusText: res.statusText, - data: data, - }); - throw new Error( - data.message || `카카오 로그인에 실패했습니다 (${res.status})` - ); - } - - // 토큰 저장 - if (data.accessToken) { - await AsyncStorage.setItem(ACCESS_TOKEN_KEY, data.accessToken); - } - if (data.refreshToken) { - await AsyncStorage.setItem(REFRESH_TOKEN_KEY, data.refreshToken); - } - if (data.userId) { - await AsyncStorage.setItem("userId", String(data.userId)); - } - if (data.membershipType) { - await AsyncStorage.setItem("membershipType", data.membershipType); - } else { - await AsyncStorage.setItem("membershipType", "FREE"); - } - - // 온보딩 여부 확인 (isOnboarded 우선 확인) - const isOnboarded = - data.isOnboarded !== undefined ? data.isOnboarded : data.onboarded; - const shouldOnboard = isOnboarded === false; - - // 신규 유저 확인 (온보딩이 완료된 경우에만) - const isNewUser = data.newUser === true; - - if (shouldOnboard || isNewUser) { - navigation.replace("KakaoOnboarding"); - } else { - navigation.replace("Main"); - } - return; - } catch (nativeError: any) { - console.error("❌ [카카오 로그인] 네이티브 모듈 실패:", nativeError); - console.log( - "⚠️ [카카오 로그인] 네이티브 모듈 실패, WebBrowser 방식으로 전환:", - nativeError.message - ); - // 네이티브 모듈 실패 시 WebBrowser 방식으로 폴백 - setLoading(false); // 로딩 상태 해제 - } - } + // ✅ APK에서도 Web OAuth 방식만 사용하도록 네이티브 SDK 로그인은 비활성화 // ✅ 방법 2: openAuthSessionAsync 사용 (Expo Go에서도 작동, 딥링크 리다이렉트 감지 가능) const KAKAO_CLIENT_ID = "99baee411cc547822f138712b19b032c"; diff --git a/src/screens/exercise/ExerciseScreen.tsx b/src/screens/exercise/ExerciseScreen.tsx index 7bc6348..888754b 100644 --- a/src/screens/exercise/ExerciseScreen.tsx +++ b/src/screens/exercise/ExerciseScreen.tsx @@ -4219,26 +4219,43 @@ const ExerciseScreen = ({ navigation }: any) => { - {hasIncompleteActivities && workoutActivities.length > 0 && ( - { - handleStartWorkoutSequence(); - }} - > - { + // 선택된 날짜가 오늘인지 확인 + const today = new Date(); + today.setHours(0, 0, 0, 0); + const baseDate = selectedDate ? new Date(selectedDate) : today; + baseDate.setHours(0, 0, 0, 0); + const isToday = baseDate.getTime() === today.getTime(); + + if ( + !isToday || + !hasIncompleteActivities || + workoutActivities.length === 0 + ) { + return null; + } + + return ( + { + handleStartWorkoutSequence(); + }} > - 시작 - - - )} + + 시작 + + + ); + })()}