diff --git a/apps/mobile/app.config.ts b/apps/mobile/app.config.ts index a00399bff1..0bac04bc58 100644 --- a/apps/mobile/app.config.ts +++ b/apps/mobile/app.config.ts @@ -11,10 +11,15 @@ const APP_VARIANT = resolveAppVariant(repoEnv.APP_VARIANT); const isIosPersonalTeamBuild = repoEnv.T3CODE_IOS_PERSONAL_TEAM === "1"; const personalTeamBundleIdentifier = repoEnv.T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID?.trim(); +const IOS_BUNDLE_IDENTIFIER_PATTERN = /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/; -if (isIosPersonalTeamBuild && !personalTeamBundleIdentifier) { +if ( + isIosPersonalTeamBuild && + (!personalTeamBundleIdentifier || + !IOS_BUNDLE_IDENTIFIER_PATTERN.test(personalTeamBundleIdentifier)) +) { throw new Error( - "T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID is required when T3CODE_IOS_PERSONAL_TEAM=1.", + "T3CODE_IOS_PERSONAL_TEAM_BUNDLE_ID must be a reverse-DNS identifier such as com.example.t3code when T3CODE_IOS_PERSONAL_TEAM=1.", ); } @@ -176,6 +181,7 @@ const config: ExpoConfig = { ], extra: { appVariant: APP_VARIANT, + iosPersonalTeamBuild: isIosPersonalTeamBuild, relay: { url: repoEnv.T3CODE_RELAY_URL ?? null, }, diff --git a/apps/mobile/src/app/settings/index.tsx b/apps/mobile/src/app/settings/index.tsx index 41799ae7b8..1d6b903c0b 100644 --- a/apps/mobile/src/app/settings/index.tsx +++ b/apps/mobile/src/app/settings/index.tsx @@ -1,4 +1,5 @@ import { useAuth, useUser } from "@clerk/expo"; +import Constants from "expo-constants"; import * as Notifications from "expo-notifications"; import { Link, Stack, useRouter } from "expo-router"; import { SymbolView } from "expo-symbols"; @@ -74,6 +75,7 @@ function LocalSettingsRouteScreen() { } function ConfiguredSettingsRouteScreen() { + const isIosPersonalTeamBuild = Constants.expoConfig?.extra?.iosPersonalTeamBuild === true; const insets = useSafeAreaInsets(); const { push } = useRouter(); const { expand: expandClerkSheet } = useClerkSettingsSheetDetent(); @@ -361,17 +363,27 @@ function ConfiguredSettingsRouteScreen() { diff --git a/apps/mobile/src/components/AppSymbol.tsx b/apps/mobile/src/components/AppSymbol.tsx index 2024363177..4f9dd502e9 100644 --- a/apps/mobile/src/components/AppSymbol.tsx +++ b/apps/mobile/src/components/AppSymbol.tsx @@ -116,6 +116,10 @@ export function SymbolView(props: SymbolViewProps) { return ; } + if (typeof props.name === "object" && props.name.android) { + return ; + } + const sfSymbol = typeof props.name === "string" ? props.name : props.name.ios; const AndroidIcon = sfSymbol ? ANDROID_ICON_BY_SF_SYMBOL[sfSymbol] : undefined; diff --git a/apps/mobile/src/features/home/HomeHeader.tsx b/apps/mobile/src/features/home/HomeHeader.tsx index 144a7aa329..1795e866b6 100644 --- a/apps/mobile/src/features/home/HomeHeader.tsx +++ b/apps/mobile/src/features/home/HomeHeader.tsx @@ -10,9 +10,10 @@ import { } from "@t3tools/contracts"; import type { MenuAction } from "@react-native-menu/menu"; import { Stack } from "expo-router"; -import { useCallback, useMemo } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { Platform, Pressable, Text as RNText, TextInput, View } from "react-native"; import { useSafeAreaInsets } from "react-native-safe-area-context"; +import type { SearchBarCommands } from "react-native-screens"; import { ControlPill, ControlPillMenu } from "../../components/ControlPill"; import { SymbolView } from "../../components/AppSymbol"; @@ -342,6 +343,7 @@ function AndroidHomeHeader(props: HomeHeaderProps) { } function IosHomeHeader(props: HomeHeaderProps) { + const searchBarRef = useRef(null); const iconColor = useThemeColor("--color-icon"); const mutedColor = useThemeColor("--color-foreground-muted"); const subtleColor = useThemeColor("--color-subtle"); @@ -351,6 +353,10 @@ function IosHomeHeader(props: HomeHeaderProps) { props.threadSortOrder !== DEFAULT_SIDEBAR_THREAD_SORT_ORDER || props.projectGroupingMode !== DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE; + useEffect(() => { + searchBarRef.current?.setText(props.searchQuery); + }, [props.searchQuery]); + return ( <> {