chore: 앱에서 안 쓰는 네이티브 화면 정리 — 웹뷰 셸이 쓰지 않는 화면·컴포넌트·lib 81개 파일, 패키지 15개(이미지·SVG·화면 캡처·사진 선택·보안 저장소·react-query·shared 등), app.json 의 secure-store·image-picker 플러그인을 뺌. 경로 파일이 없으면 Expo Router 안내 화면이 떠서 앱이 죽어 빈 index.tsx 를 둠. 이벤트 문서·AGENTS.md 를 웹뷰 구조에 맞춤
This commit is contained in:
1 parent
d4f937b439
commit
016b77f234
88 files changed
+66
-9204
No files matched your search
+3
-6
@@ -86,12 +86,9 @@ GA4 태그(`gtag.js`, 측정 ID `G-D378J4X373`)를 `index.html`에 심고, 화
|
||||
|
||||
## 앱 (안드로이드, `mobile/`)
|
||||
|
||||
- **웹뷰 셸 전환(`feat/app-webview-shell`)**: 앱이 날씨각 웹을 웹뷰로 띄우는 껍데기가 되면 아래 앱 이벤트는 쓰지 않고, 웹이 같은 이벤트를 그대로 보내며 `platform: 'android_app'`으로 찍힌다. 앱 안에서 구글 로그인·공유·위치가 실패하면 `app_bridge_error`, 앱을 켜면 `app_launch`(`mode: 'android_app'`)가 나간다. 앱 사용자는 `platform`으로 가른다.
|
||||
|
||||
- 앱도 같은 이벤트 이름·값으로 `track()`을 부른다 (`mobile/src/lib/analytics.ts`). 모든 이벤트에 `platform: 'app'`이 붙는다.
|
||||
- **아직 GA4로 보내지 않는다 (2026-11-04).** Firebase Analytics(`google-services.json`)를 붙이면 앱 시작 때 `setAnalyticsSender`로 보내는 함수를 단다. 그 전까지 `track()`은 아무것도 보내지 않는다. 개발 빌드(`__DEV__`)는 붙인 뒤에도 보내지 않는다.
|
||||
- 앱에서 부르는 곳: `sheet_open`(`components/sheets/index.tsx`), `view_gak`(`sheets/gak.tsx`), `select_content`(`sheets/article.tsx`), `login`·`sign_up`(`sheets/login.tsx`, 구글만), `region_change`(`sheets/region.tsx`·`lib/region.tsx`), `like`(`post/post-card.tsx` 글, `sheets/comments.tsx` 댓글), `comment`·`report`·`block`·`terms_agree`(`sheets/comments.tsx`), `share`(`lib/share-image.ts`), `hero_day_switch`(`today/hero.tsx`), `like`의 `hero_post`·`gak_post`(`lib/pinned-like.ts`). 레벨 창·레벨업 창은 `sheet_open`(`level`·`levelUp`)으로 잡힌다. 동네 이야기: `talk_post`(`components/talk/talk.tsx` `Composer`), `like`·`report`·`block`의 `talk`(`talk/talk.tsx`), `talk_comment`(`sheets/comments.tsx`), `feed_item_view`(`app/(tabs)/index.tsx` `useSeen`, 화면에 반쯤 보일 때). 내 각: `my_gak_save`(`lib/my-gak.ts`), 만들기·상세 창은 `sheet_open`(`mix`·`myGak`). 오늘 아이콘 줄: `today_icon`(`components/today/icons.tsx`). 사주: `saju_input`(`components/saju/birth-form.tsx`), `saju_view`(`saju/reading.tsx`). 단풍 지도: `foliage_open`(`app/foliage.tsx`), `foliage_spot`(`components/foliage/*`, 화면 `page`·피드 카드 `card`). 쇼츠: `shorts_open`·`shorts_view`·`shorts_sound`(`app/shorts/[id].tsx`). 구름 합치기 게임은 앱이 웹 `/game`을 웹뷰로 띄우므로 `game_start`·`game_round`·`game_over`는 웹 페이지가 보내고 `platform: 'web'`으로 찍힌다(앱 안 게임과 웹 게임을 GA에서 나눠 볼 수 없음).
|
||||
- 앱 `share`의 `ratio`는 `'card'` — 보이는 카드를 그대로 찍어 보내 비율을 고르지 않는다.
|
||||
- 앱은 날씨각 웹을 웹뷰로 띄우는 껍데기라(`mobile/src/components/web-shell.tsx`) 앱에서 따로 보내는 이벤트가 없다. 웹이 같은 이벤트를 그대로 보내고 `platform: 'android_app'`으로 찍힌다. 앱 사용자는 `platform`으로 가른다.
|
||||
- 앱에서만 나가는 것: 앱을 켜면 `app_launch`(`mode: 'android_app'`), 앱 안에서 구글 로그인·공유·위치가 실패하면 `app_bridge_error`. 둘 다 웹 코드가 보낸다.
|
||||
- 예전 네이티브 화면과 그 화면의 `track()`(`mobile/src/lib/analytics.ts`)은 지웠다. 새 화면·이벤트는 웹(`frontend/`)에만 더한다.
|
||||
|
||||
## GA4 설정
|
||||
|
||||
|
||||
Reference in new issue
Block a user