From dd2d02758beae9cdfafd346dfb46880ae1abb7bb Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 19 Oct 2026 10:54:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=95=B1=20=EC=B6=9C=EC=8B=9C=20?= =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=84=A4=EC=A0=95(eas.json=C2=B7=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EC=A0=95=EB=A6=AC),=20=EC=95=88=EB=93=9C=EB=A1=9C?= =?UTF-8?q?=EC=9D=B4=EB=93=9C=20=EC=8B=9C=ED=8A=B8=20=ED=82=A4=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=EA=B0=80=20=EC=9E=85=EB=A0=A5=EC=B9=B8=20=EA=B0=80?= =?UTF-8?q?=EB=A6=AC=EB=8D=98=20=EA=B2=83=C2=B7=EC=B2=AB=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=ED=85=8C=EB=A7=88=20=EA=B2=BD=EA=B3=A0=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 5 ++++- mobile/app.json | 16 ++++++++++---- mobile/eas.json | 29 ++++++++++++++++++++++++++ mobile/src/components/sheets/index.tsx | 5 +++-- mobile/src/lib/sky.tsx | 13 ++++++++++-- 5 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 mobile/eas.json diff --git a/TODO.md b/TODO.md index 6db6811..eb6a945 100644 --- a/TODO.md +++ b/TODO.md @@ -167,7 +167,10 @@ | [x] | 2단계: 앱에 react-query·Uniwind 설정 + Metro가 `react`를 `mobile/node_modules`(19.2.3) 것만 쓰게 설정 — 루트에는 웹용 react 19.3.0이 있고 RN 렌더러는 19.2.3에서만 돌아감 | 앱 시작 준비 | `mobile/metro.config.js`, `mobile/src/app/_layout.tsx`, `mobile/src/lib/query-client.ts` | | [x] | 앱 토큰 저장소 `expo-secure-store`로 `configureApi` 연결, API 주소는 `EXPO_PUBLIC_API_BASE_URL` | 웹은 localStorage | `mobile/src/lib/api.ts`, `mobile/.env.example` | | [x] | 안드로이드 에뮬레이터(Expo Go)에서 확인: 오늘 화면 실데이터, 위치 권한 창, 탭 이동, 각 근거 시트 | | `mobile/` | -| [ ] | 안드로이드에서 로그인·좋아요·이미지 공유 눌러 보기 (에뮬레이터가 느려 일부만 확인) | | `mobile/` | +| [x] | 안드로이드 개발 빌드에서 가입·로그인(아바타 표시)·좋아요·이미지 공유·위치로 지역 찾기 확인 | | `mobile/` | +| [ ] | 안드로이드 댓글 쓰기·내 정보 바꾸기·로그아웃 확인 | 아직 안 눌러 봄 | `mobile/src/components/sheets/` | +| [x] | 출시 빌드 설정: `eas.json`(production 은 운영 API·사이트 주소, 빌드 번호 자동 증가), iOS 수출 규정 암호화 없음, 안드로이드 권한은 대략 위치만(정밀 위치·저장소·다른 앱 위에 그리기 뺌) | | `mobile/eas.json`, `mobile/app.json` | +| [ ] | 출시 빌드 전 준비(사용자): Apple Developer·Google Play Console·Expo 계정, 스토어 스크린샷·설명·데이터 안전 양식 | 서명·제출에 필요 | | | [ ] | Xcode 설치 후 iOS 시뮬레이터에서 전체 확인 | | `mobile/` | | [x] | 안드로이드 개발 빌드(`expo run:android`) 설치 확인: 홈 화면 해 아이콘·'날씨각' 이름, 실데이터 화면 | | `mobile/` | | [ ] | **[결정 필요]** 앱 ID(안드로이드 패키지·iOS 번들 ID) — 지금 `com.anonymous.nalssigak`. 후보 `kr.o2o.nalssigak` / `kr.o2o.weather`. 스토어에 올리면 못 바꿈 | 스토어 등록 때 정하기로 | `mobile/app.json` | diff --git a/mobile/app.json b/mobile/app.json index 4d4ac63..11b1630 100644 --- a/mobile/app.json +++ b/mobile/app.json @@ -8,7 +8,10 @@ "scheme": "nalssigak", "userInterfaceStyle": "automatic", "ios": { - "icon": "./assets/images/icon.png" + "icon": "./assets/images/icon.png", + "infoPlist": { + "ITSAppUsesNonExemptEncryption": false + } }, "android": { "adaptiveIcon": { @@ -19,10 +22,15 @@ }, "predictiveBackGestureEnabled": false, "permissions": [ - "android.permission.ACCESS_COARSE_LOCATION", - "android.permission.ACCESS_FINE_LOCATION" + "android.permission.ACCESS_COARSE_LOCATION" ], - "package": "com.anonymous.nalssigak" + "package": "com.anonymous.nalssigak", + "blockedPermissions": [ + "android.permission.ACCESS_FINE_LOCATION", + "android.permission.SYSTEM_ALERT_WINDOW", + "android.permission.READ_EXTERNAL_STORAGE", + "android.permission.WRITE_EXTERNAL_STORAGE" + ] }, "web": { "output": "static", diff --git a/mobile/eas.json b/mobile/eas.json new file mode 100644 index 0000000..b9e19e8 --- /dev/null +++ b/mobile/eas.json @@ -0,0 +1,29 @@ +{ + "cli": { + "version": ">= 16.0.0", + "appVersionSource": "remote" + }, + "build": { + "development": { + "developmentClient": true, + "distribution": "internal" + }, + "preview": { + "distribution": "internal", + "env": { + "EXPO_PUBLIC_API_BASE_URL": "https://weather.o2o.kr", + "EXPO_PUBLIC_SITE_URL": "https://weather.o2o.kr" + } + }, + "production": { + "autoIncrement": true, + "env": { + "EXPO_PUBLIC_API_BASE_URL": "https://weather.o2o.kr", + "EXPO_PUBLIC_SITE_URL": "https://weather.o2o.kr" + } + } + }, + "submit": { + "production": {} + } +} diff --git a/mobile/src/components/sheets/index.tsx b/mobile/src/components/sheets/index.tsx index dda6630..3f0872f 100644 --- a/mobile/src/components/sheets/index.tsx +++ b/mobile/src/components/sheets/index.tsx @@ -1,6 +1,6 @@ import { subscribeAuth } from '@nalssigak/shared/api/auth'; import { useCallback, useEffect, useMemo, useState, type ReactNode } from 'react'; -import { KeyboardAvoidingView, Modal, Platform, Pressable, Text, View } from 'react-native'; +import { KeyboardAvoidingView, Modal, Pressable, Text, View } from 'react-native'; import Animated, { Easing, useAnimatedStyle, useReducedMotion, useSharedValue, withTiming } from 'react-native-reanimated'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; @@ -65,7 +65,8 @@ function SheetHost({ state: next, onClose }: { state: SheetState; onClose: () => return ( - + {/* 안드로이드도 화면 끝까지 그려(edge-to-edge) 창이 줄지 않으니 양쪽 모두 키보드 높이만큼 밀어 올린다 */} + {state && ( diff --git a/mobile/src/lib/sky.tsx b/mobile/src/lib/sky.tsx index 92219c4..935decc 100644 --- a/mobile/src/lib/sky.tsx +++ b/mobile/src/lib/sky.tsx @@ -7,6 +7,16 @@ export type SkyApi = { kind: TimeKind; preview: TimeKind | null; setServerKind: const SkyContext = createContext(null); +/** 밤에만 어두운 테마 (기기 다크 모드와 상관없이 하늘 시간대를 따른다). 같으면 건드리지 않는다 */ +function applyTheme(kind: TimeKind) { + const theme = kind === 'night' ? 'dark' : 'light'; + if (Uniwind.currentTheme !== theme) Uniwind.setTheme(theme); +} + +// 첫 화면을 그리기 전에 지금 시각의 테마로 맞춰, 그리는 도중에 테마가 바뀌지 않게 한다 +const t0 = kst(new Date()); +applyTheme(kindOfHour(t0.h, t0.mo, t0.mi)); + export function useSky() { const ctx = use(SkyContext); if (!ctx) throw new Error('useSky must be used inside SkyProvider'); @@ -23,8 +33,7 @@ export function SkyProvider({ children }: { children: ReactNode }) { }, []); const t = kst(now); const kind = preview ?? serverKind ?? kindOfHour(t.h, t.mo, t.mi); - // 밤에만 어두운 테마 (기기 다크 모드와 상관없이 하늘 시간대를 따른다) - useEffect(() => Uniwind.setTheme(kind === 'night' ? 'dark' : 'light'), [kind]); + useEffect(() => applyTheme(kind), [kind]); const api = useMemo(() => ({ kind, preview, setPreview, setServerKind }), [kind, preview]); return {children}; }