From 045aaa707af0d6e44aa2873255da08b8f0485ca4 Mon Sep 17 00:00:00 2001 From: seongwon seo Date: Sat, 21 Nov 2026 19:34:30 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EB=84=A4=EC=9D=B4=ED=8B=B0?= =?UTF-8?q?=EB=B8=8C=20Mixpanel=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=EC=97=90=20?= =?UTF-8?q?=EA=B8=B0=EA=B8=B0=20=EC=96=B8=EC=96=B4(device=5Flocale)?= =?UTF-8?q?=EB=A5=BC=20=EB=B6=99=EC=9D=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 외국인 유학생 수요를 보려고 웹(Moadong/moadong#1920)은 device_locale을 super property로 이미 수집한다. 앱은 웹과 별개의 Mixpanel 인스턴스를 써서 구독처럼 네이티브에서만 나는 이벤트에는 이 값이 없었다. - expo-localization의 getLocales()[0].languageTag(iOS Locale.preferredLanguages 첫 값)를 init 직후 super property로 등록한다. Locale.current는 앱이 선언한 현지화(en 하나)와 협상된 값이라 기기 언어와 무관하게 en이 될 수 있어 쓰지 않는다 - 등록은 자체 try/catch로 감싼다. init과 같은 try 안에서 throw하면 getMixpanel()이 계속 null을 돌려줘 네이티브 이벤트가 전부 빠진다 - 값이 없으면 등록하지 않아 빈 문자열 세그먼트를 만들지 않는다 - Podfile.lock, project.pbxproj는 pod install 산출물이다(ExpoLocalization pod, privacy bundle 복사 줄) 이슈에 있던 웹뷰 window.deviceLocale 주입은 하지 않는다. WebKit의 navigator.language가 이미 호스트 앱의 AppleLanguages를 읽어 정확도 이득이 없고, 홈·범용 웹뷰의 학생 토큰 주입과 같은 prop을 나눠 써야 해 위험만 늘어난다. Closes #30 Co-Authored-By: Claude Opus 5.5 --- ios/Podfile.lock | 6 ++++++ ios/app.xcodeproj/project.pbxproj | 2 ++ package-lock.json | 20 ++++++++++++++++++++ package.json | 1 + utils/mixpanel.ts | 21 +++++++++++++++++++++ 5 files changed, 50 insertions(+) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 54264d8..175e749 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -62,6 +62,8 @@ PODS: - ExpoModulesCore - ExpoLinking (8.0.12): - ExpoModulesCore + - ExpoLocalization (17.0.9): + - ExpoModulesCore - ExpoModulesCore (3.0.30): - boost - DoubleConversion @@ -3207,6 +3209,7 @@ DEPENDENCIES: - ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`) - ExpoLinearGradient (from `../node_modules/expo-linear-gradient/ios`) - ExpoLinking (from `../node_modules/expo-linking/ios`) + - ExpoLocalization (from `../node_modules/expo-localization/ios`) - ExpoModulesCore (from `../node_modules/expo-modules-core`) - ExpoSplashScreen (from `../node_modules/expo-splash-screen/ios`) - ExpoSymbols (from `../node_modules/expo-symbols/ios`) @@ -3369,6 +3372,8 @@ EXTERNAL SOURCES: :path: "../node_modules/expo-linear-gradient/ios" ExpoLinking: :path: "../node_modules/expo-linking/ios" + ExpoLocalization: + :path: "../node_modules/expo-localization/ios" ExpoModulesCore: :path: "../node_modules/expo-modules-core" ExpoSplashScreen: @@ -3569,6 +3574,7 @@ SPEC CHECKSUMS: ExpoKeepAwake: 44bf6715bc1d2ddb17afe19d927cd039cda123f0 ExpoLinearGradient: 814a21fc4056c3cf606e4f19e31e47074c5b5a86 ExpoLinking: 4f1fc07ec4b3c10d60ec91617db973575104ec7e + ExpoLocalization: 7c29dc7a5193c732f6eae1da42b427ac15507ae1 ExpoModulesCore: bbb6e8cd8231e84a3e30c8e01f369d24cba37c63 ExpoSplashScreen: 72fbc6dd9d6404dd9d0725a56c9ac1383bc0b14f ExpoSymbols: a0e8217dc2789d9ed0f28b63a466fc5beafd5100 diff --git a/ios/app.xcodeproj/project.pbxproj b/ios/app.xcodeproj/project.pbxproj index 737eed9..8895831 100644 --- a/ios/app.xcodeproj/project.pbxproj +++ b/ios/app.xcodeproj/project.pbxproj @@ -277,6 +277,7 @@ "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/EXNotifications/ExpoNotifications_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/ExpoLocalization/ExpoLocalization_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoSystemUI/ExpoSystemUI_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseABTesting/FirebaseABTesting_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseAuth/FirebaseAuth_Privacy.bundle", @@ -310,6 +311,7 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoNotifications_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoLocalization_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoSystemUI_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseABTesting_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseAuth_Privacy.bundle", diff --git a/package-lock.json b/package-lock.json index 168f572..161a127 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "expo-image": "~3.0.9", "expo-linear-gradient": "~15.0.7", "expo-linking": "~8.0.8", + "expo-localization": "~17.0.9", "expo-notifications": "^0.32.12", "expo-router": "~6.0.10", "expo-splash-screen": "~31.0.10", @@ -7711,6 +7712,19 @@ "react-native": "*" } }, + "node_modules/expo-localization": { + "version": "17.0.9", + "resolved": "https://registry.npmjs.org/expo-localization/-/expo-localization-17.0.9.tgz", + "integrity": "sha512-k5eYHr7iLMob3M8cHH6bgDrDRmqnZG8xKGLhpx8ST+LsFXmSgYpJ/t0VwWm0gz64C/K669XhObdG3D6QwCGqhw==", + "license": "MIT", + "dependencies": { + "rtl-detect": "^1.0.2" + }, + "peerDependencies": { + "expo": "*", + "react": "*" + } + }, "node_modules/expo-modules-autolinking": { "version": "3.0.25", "resolved": "https://registry.npmjs.org/expo-modules-autolinking/-/expo-modules-autolinking-3.0.25.tgz", @@ -12840,6 +12854,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rtl-detect": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.1.2.tgz", + "integrity": "sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==", + "license": "BSD-3-Clause" + }, "node_modules/safe-array-concat": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.4.tgz", diff --git a/package.json b/package.json index 2881f63..25b8b5c 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "expo-image": "~3.0.9", "expo-linear-gradient": "~15.0.7", "expo-linking": "~8.0.8", + "expo-localization": "~17.0.9", "expo-notifications": "^0.32.12", "expo-router": "~6.0.10", "expo-splash-screen": "~31.0.10", diff --git a/utils/mixpanel.ts b/utils/mixpanel.ts index 2a80ecb..6b6c981 100644 --- a/utils/mixpanel.ts +++ b/utils/mixpanel.ts @@ -1,4 +1,5 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; +import { getLocales } from 'expo-localization'; import { Mixpanel } from 'mixpanel-react-native'; const SESSION_ID_KEY = '@moadong_session_id'; @@ -30,6 +31,25 @@ export const getOrCreateMixpanelSessionId = async (): Promise => { } }; +/** + * 기기 언어 설정을 super property로 등록한다. 웹(Moadong/moadong#1920)과 같은 키를 쓴다. + * + * Locale.current(앱 번들 언어와 협상된 값)가 아니라 기기 선호 언어 목록의 첫 값을 쓴다. + * iOS 앱은 현지화를 en(developmentRegion) 하나만 선언하므로 협상된 값은 기기 언어와 + * 무관하게 en이 될 수 있다. + * 값이 없으면 빈 문자열 세그먼트가 생기지 않도록 등록하지 않는다. + * 부가 속성 하나 때문에 Mixpanel 초기화 전체가 실패하지 않도록 오류는 여기서 삼킨다. + */ +const registerDeviceLocale = (mixpanel: Mixpanel): void => { + try { + const deviceLocale = getLocales()[0]?.languageTag; + if (!deviceLocale) return; + mixpanel.registerSuperProperties({ device_locale: deviceLocale }); + } catch (error) { + console.error('[Mixpanel] device_locale 등록 실패:', error); + } +}; + export const getMixpanel = async (): Promise => { if (mixpanelInstance && isInitialized) { return mixpanelInstance; @@ -51,6 +71,7 @@ export const getMixpanel = async (): Promise => { try { if (mixpanelInstance) { await mixpanelInstance.init(); + registerDeviceLocale(mixpanelInstance); isInitialized = true; } } catch (error) { From b95dcfd92fbcb4cb64ec343bd684298e72b68750 Mon Sep 17 00:00:00 2001 From: seongwon seo Date: Sat, 21 Nov 2026 19:44:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?ci:=20Android=20Check=EA=B0=80=20JDK=2017?= =?UTF-8?q?=EB=A1=9C=20Gradle=EC=9D=84=20=EB=8F=8C=EB=A6=AC=EA=B2=8C=20?= =?UTF-8?q?=EA=B3=A0=EC=A0=95=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ubuntu-latest가 ubuntu-24.04에서 ubuntu-26.04로 바뀌면서 러너 기본 JDK가 올라갔다. Gradle 8.14.3은 Java 24까지만 실행할 수 있어, 빌드 스크립트를 분석하는 단계에서 "Unsupported class file major version 69"(Java 25)로 assembleDebug가 8초 만에 실패했다. 워크플로가 JDK를 지정하지 않아 이미지 기본값을 그대로 탔던 게 원인이다. 러너를 ubuntu-24.04로 고정하는 대신 setup-java로 JDK 17(RN 0.81 권장)을 명시한다. 이미지가 또 바뀌어도 같은 문제가 생기지 않는다. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/android-check.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android-check.yml b/.github/workflows/android-check.yml index 4ab3b1f..e82337d 100644 --- a/.github/workflows/android-check.yml +++ b/.github/workflows/android-check.yml @@ -20,6 +20,12 @@ jobs: node-version: 20 cache: npm + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + - name: Setup Ruby uses: ruby/setup-ruby@v1 with: From b136aff1e5e96ed18096a38558594d170553bd99 Mon Sep 17 00:00:00 2001 From: seongwon seo Date: Sun, 22 Nov 2026 00:02:14 +0900 Subject: [PATCH 3/3] chore: bump app version to 1.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앱 버전 1.7.4, iOS buildNumber 21, Android versionCode 21. 기기 언어(device_locale)를 네이티브 Mixpanel 이벤트에 붙이는 #50을 내보내기 위한 릴리즈다. 사용자에게 보이는 기능 변화가 없는 계측 추가라 patch를 올린다. 지난 bump 커밋(851febd)과 같은 3개 파일을 고친다. Co-Authored-By: Claude Opus 5.5 --- app.json | 6 +++--- ios/app.xcodeproj/project.pbxproj | 8 ++++---- ios/app/Info.plist | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app.json b/app.json index 94dcf18..649c718 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "모아동", "slug": "moadong-app", - "version": "1.7.3", + "version": "1.7.4", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "moadongapp", @@ -10,7 +10,7 @@ "newArchEnabled": true, "ios": { "supportsTablet": false, - "buildNumber": "20", + "buildNumber": "21", "googleServicesFile": "./GoogleService-Info.plist", "bundleIdentifier": "com.moadong.moadong", "associatedDomains": [ @@ -26,7 +26,7 @@ }, "android": { "jsEngine": "hermes", - "versionCode": 20, + "versionCode": 21, "adaptiveIcon": { "backgroundColor": "#E6F4FE", "foregroundImage": "./assets/images/android-icon-foreground.png", diff --git a/ios/app.xcodeproj/project.pbxproj b/ios/app.xcodeproj/project.pbxproj index 8895831..c9b9c41 100644 --- a/ios/app.xcodeproj/project.pbxproj +++ b/ios/app.xcodeproj/project.pbxproj @@ -423,7 +423,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = app/app.entitlements; - CURRENT_PROJECT_VERSION = 20; + CURRENT_PROJECT_VERSION = 21; DEVELOPMENT_TEAM = 2QMK9GBWN6; ENABLE_BITCODE = NO; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -436,7 +436,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7.3; + MARKETING_VERSION = 1.7.4; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -460,7 +460,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = app/app.entitlements; - CURRENT_PROJECT_VERSION = 20; + CURRENT_PROJECT_VERSION = 21; DEVELOPMENT_TEAM = 2QMK9GBWN6; INFOPLIST_FILE = app/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.1; @@ -468,7 +468,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.7.3; + MARKETING_VERSION = 1.7.4; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/ios/app/Info.plist b/ios/app/Info.plist index f360f8c..a0c4a11 100644 --- a/ios/app/Info.plist +++ b/ios/app/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.7.3 + 1.7.4 CFBundleSignature ???? CFBundleURLTypes @@ -39,7 +39,7 @@ CFBundleVersion - 20 + 21 LSMinimumSystemVersion 12.0 LSRequiresIPhoneOS