Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/expo/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
name: 'Exo',
slug: 'rooots',
scheme: 'rooots',
version: '0.3.0',
version: '0.4.0',
orientation: 'portrait',
// androidNavigationBar: {
// visible: 'immersive',
Expand All @@ -19,7 +19,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
},
assetBundlePatterns: ['**/*'],
ios: {
buildNumber: '2',
buildNumber: '1',
bundleIdentifier: 'com.ramimaalouf.rooots',
supportsTablet: true,
// needs membership to Apple Developer Program to use Push Notifications
Expand All @@ -30,7 +30,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
},
},
android: {
versionCode: 2,
versionCode: 1,
package: 'com.ramimaalouf.rooots',
edgeToEdgeEnabled: true,
// googleServicesFile: './android/app/google-services.json',
Expand Down
8 changes: 5 additions & 3 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rooots/expo",
"version": "0.3.0",
"version": "0.4.0",
"private": true,
"main": "index.js",
"scripts": {
Expand All @@ -27,10 +27,11 @@
"@orama/orama": "^2.0.19",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-native-community/datetimepicker": "8.3.0",
"@react-navigation/drawer": "^7.4.2",
"@rooots/app": "workspace:*",
"@rooots/ui": "workspace:*",
"@shopify/flash-list": "1.7.6",
"@tamagui/lucide-icons": "^1.126.14",
"@tamagui/lucide-icons": "^1.128.1",
"@tanstack/query-async-storage-persister": "catalog:",
"@tanstack/react-query": "catalog:",
"@tanstack/react-query-persist-client": "catalog:",
Expand All @@ -43,6 +44,7 @@
"expo-background-fetch": "~13.1.5",
"expo-bluetooth": "^0.0.0",
"expo-blur": "~14.1.4",
"expo-clipboard": "^7.1.4",
"expo-constants": "^17.1.6",
"expo-dev-client": "~5.1.8",
"expo-device": "~7.1.4",
Expand Down Expand Up @@ -83,7 +85,7 @@
"@rooots/api": "workspace:*",
"@rooots/tailwind-config": "workspace:*",
"@rooots/tsconfig": "workspace:*",
"@tamagui/babel-plugin": "^1.120.2",
"@tamagui/babel-plugin": "^1.128.1",
"@types/babel__core": "^7.20.5",
"@types/react": "catalog:react19",
"babel-preset-expo": "~13.1.11",
Expand Down
56 changes: 41 additions & 15 deletions apps/expo/scripts/build_ios.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,52 @@
#!/bin/zsh
#!/bin/bash

# Check if bundle identifier is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <bundle-identifier>"
# Check if a .tar.gz file was provided as an argument
if [ $# -eq 0 ]; then
echo "Error: No arguments provided. Please provide either a bundle identifier or a .tar.gz file."
echo "Usage: $0 <bundle_identifier> or $0 <path/to/build.tar.gz>"
exit 1
fi

BUNDLE_IDENTIFIER=$1
# Check if the argument is a .tar.gz file
if [[ "$1" == *".tar.gz" ]]; then
BUILD_NAME=$(basename "$1")
BUILD_DIR=$(dirname "$1")

# Step 1: Generate the tar.gz build file and capture the build name
echo "Generating the tar.gz build file..."
BUILD_OUTPUT=$(eas build -p ios --local -e development 2>&1)
BUILD_NAME=$(echo "$BUILD_OUTPUT" | grep -oE '[^ ]+\.tar\.gz' | tail -n 1)
# If a full path wasn't provided, assume it's in the current directory
if [ "$BUILD_DIR" = "." ]; then
BUILD_DIR=$(pwd)
fi

if [ -z "$BUILD_NAME" ]; then
echo "Error: Could not determine the build file name."
exit 1
fi
# Check if the file exists
if [ ! -f "$1" ]; then
echo "Error: File $1 not found."
exit 1
fi

echo "Build file generated: ${BUILD_NAME}"
# Copy the file to current directory if it's not already here
if [ "$(realpath "$1")" != "$(pwd)/$BUILD_NAME" ]; then
cp "$1" .
fi
else
# Original build process
BUNDLE_IDENTIFIER=$1
echo "Generating the tar.gz build file..."
BUILD_OUTPUT=$(eas build -p ios --local -e development 2>&1)
BUILD_NAME=$(echo "$BUILD_OUTPUT" | grep -oE '[^ ]+\.tar\.gz' | tail -n1)

if [ -z "$BUILD_NAME" ]; then
echo "Error: Could not determine the build file name."
exit 1
fi
echo "Build file generated: ${BUILD_NAME}"
fi

# Step 2: Extract the tar.gz file
echo "Extracting the build file..."
tar -xzf "${BUILD_NAME}"

# Step 3: Find the .app folder
APP_FOLDER=$(find . -name "*.app" -type d)
APP_FOLDER=$(find . -name "*.app" -type d | head -n 1)

if [ -z "$APP_FOLDER" ]; then
echo "Error: .app folder not found."
Expand All @@ -34,6 +55,11 @@ fi

echo "Found app folder: ${APP_FOLDER}"

# Rest of your script continues here...
# [Previous content after finding APP_FOLDER]

echo "Found app folder: ${APP_FOLDER}"

# Step 4: Install the app on the simulator
echo "Installing the app on the simulator..."
IS_INSTALLED=$(xcrun simctl install booted "${APP_FOLDER}")
Expand Down
6 changes: 3 additions & 3 deletions apps/expo/src/app/(auth)/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Redirect } from 'expo-router'
import type { ComponentPropsWithoutRef, FC } from 'react'

// If I wanna have an AuthProvider instead: https://github.com/fredrikburmester/expo-router-3-tab-example-with-auth/blob/main/context/AuthProvider.tsx
interface Props extends ComponentPropsWithoutRef<'div'> {}
interface Props extends ComponentPropsWithoutRef<'div'> { }

const Component: FC<Props> = (props) => {
const {} = props
const { } = props

return <Redirect href='/(app)/(tabs)/questions' />
return <Redirect href='/(tabs)/questions' />
}

export default Component
1 change: 1 addition & 0 deletions apps/expo/src/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default function TabLayout() {
},
}}
>

<Tabs.Screen
name='questions'
options={{
Expand Down
6 changes: 6 additions & 0 deletions apps/expo/src/app/(tabs)/questions/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getRandomQuestion } from '@rooots/app/utils/questions';
import { HelpCircle } from '@tamagui/lucide-icons';
import { useVideoSheetActions } from '@rooots/app/hooks/useVideoSheetActions';
import { trackGenerateQuestionClick, trackOnboardingClick } from '@rooots/app/utils/amplitude'
import { DrawerToggleButton } from '@react-navigation/drawer';

const Layout = () => {
const themeName = useThemeName()
Expand Down Expand Up @@ -45,6 +46,11 @@ const Layout = () => {
experimentalBlurMethod={experimentalBlurMethod}
/>
),
headerLeft: (props) => (
<View marginStart={-20}>
<DrawerToggleButton {...props} tintColor={theme.color?.val} />
</View>
),
headerRight: () => (
<View style={{ flexDirection: 'row', gap: 15 }}>
<TouchableOpacity onPress={() => {
Expand Down
28 changes: 15 additions & 13 deletions apps/expo/src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,46 @@
import { router, Stack } from 'expo-router'
import { Provider } from '@rooots/app/provider'
import DemoVideo from '@rooots/app/components/DemoVideo'
import { BottomSheet } from '@rooots/app/components/BottomSheet'
import { videoSheetRefAtom } from '@rooots/app/atoms/sheet'
import React from 'react';
import { Redirect, usePathname, useRouter } from 'expo-router';
import { useEffect, useState } from 'react';
import { OnboardingProvider, useOnboarding } from '@rooots/app';
import DevToolsButton from '@rooots/app/components/DevTools/DevToolsButton';
import { View } from 'react-native'
import { Drawer } from 'expo-router/drawer';
import type { DrawerContentComponentProps } from '@react-navigation/drawer';
import { AppDrawerContent } from '@rooots/app/components/AppDrawerContent';

export {
// Catch any errors thrown by the Layout component.
ErrorBoundary,
} from 'expo-router'

const RootLayoutNav = () => {
const { isOnboarded, resetOnboarding } = useOnboarding();

return (
<OnboardingProvider>
<Stack
initialRouteName="(onboarding)"
<Drawer
initialRouteName={isOnboarded ? '(tabs)' : '(onboarding)'}
drawerContent={(props: DrawerContentComponentProps) => (
<AppDrawerContent />
)}
screenOptions={{
// headerTransparent: true,
headerShown: false,
// navigationBarColor: 'transparent',
// navigationBarHidden: true,
}}
>
<Stack.Screen name='(tabs)' options={{ title: 'Home' }} />
<Stack.Screen name='(auth)' options={{ title: 'Authorization' }} />
<Stack.Screen name='(onboarding)' options={{ title: 'Onboarding' }} />
</Stack>
<Drawer.Screen name='(onboarding)' options={{ title: 'Onboarding' }} />
<Drawer.Screen name='(tabs)' options={{ title: 'Home' }} />
<Drawer.Screen name='(auth)' options={{ title: 'Authorization' }} />
</Drawer>
</OnboardingProvider>
);
}

const RootLayout = () => {

export default function RootLayout() {
// const [loaded, error] = useFonts({
// Inter: require('@tamagui/font-inter/otf/Inter-Medium.otf'),
// InterBold: require('@tamagui/font-inter/otf/Inter-Bold.otf'),
Expand Down Expand Up @@ -91,5 +95,3 @@ const RootLayout = () => {
</OnboardingProvider>
)
}

export default RootLayout
9 changes: 3 additions & 6 deletions apps/expo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
"~/*": [
"./src/*"
],
// "@rooots/app": [
// "../../../packages/app/index.ts"
// ],
// "@rooots/app/*": [
// "../../../packages/app/*"
// ]
"@roo/*": [
"../../packages/*"
]
},
"jsx": "react-native",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
Expand Down
2 changes: 1 addition & 1 deletion apps/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"description": "",
"author": "Rami <rami.rami@ucalgary.ca> (rami-maalouf.tech)",
"license": "MIT",
"license": "GPL-3.0-only",
"contributors": [
"Rami <rami.rami@ucalgary.ca> (rami-maalouf.tech)"
],
Expand Down
6 changes: 3 additions & 3 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@rooots/auth": "workspace:*",
"@rooots/ui": "workspace:*",
"@t3-oss/env-nextjs": "^0.9.2",
"@tamagui/config": "^1.120.2",
"@tamagui/next-theme": "^1.120.2",
"@tamagui/config": "^1.128.1",
"@tamagui/next-theme": "^1.128.1",
"@tanstack/react-query": "catalog:",
"@tanstack/react-query-devtools": "catalog:",
"@tanstack/react-query-next-experimental": "catalog:",
Expand All @@ -36,7 +36,7 @@
"zod": "catalog:"
},
"devDependencies": {
"@tamagui/next-plugin": "^1.120.2",
"@tamagui/next-plugin": "^1.128.1",
"@types/node": "^20.11.20",
"@types/react": "catalog:react19",
"@types/react-dom": "catalog:react19",
Expand Down
Loading