Update logic for profile creation

This commit is contained in:
Milan Paunovic
2024-08-21 20:03:40 +02:00
parent 4a20f7a53e
commit 957e0a582e
16 changed files with 1670 additions and 2228 deletions

View File

@ -4,6 +4,10 @@ import { View, TextField, Picker, Checkbox } from "react-native-ui-lib";
import useAuth from "@/hooks/firebase/useAuth"; import useAuth from "@/hooks/firebase/useAuth";
import useChildren from "@/hooks/firebase/useChildren"; import useChildren from "@/hooks/firebase/useChildren";
import useCaregivers from "@/hooks/firebase/useCaregivers"; import useCaregivers from "@/hooks/firebase/useCaregivers";
import {useCreateSubUser} from "@/hooks/firebase/useCreateSubUser";
import {email} from "@sideway/address";
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
import {uuidv4} from "@firebase/util";
const Screen: React.FC = () => { const Screen: React.FC = () => {
const { const {
@ -17,6 +21,7 @@ const Screen: React.FC = () => {
handleSignOut, handleSignOut,
handleProfileTypeSelection, handleProfileTypeSelection,
handleRegister, handleRegister,
} = useAuth(); } = useAuth();
const { const {
@ -35,6 +40,22 @@ const Screen: React.FC = () => {
handleNewCaregiver, handleNewCaregiver,
} = useCaregivers(); } = useCaregivers();
const {mutateAsync: createSubUser} = useCreateSubUser()
const createNewSubUser = async (userProfile: UserProfile) => {
await createSubUser({...userProfile, email: `${uuidv4()}@test.com`})
// createSubUser({
// email,
// password,
// userType: profileType!,
// name: "",
// contact: "+381628334",
// ...child
// })
await fetchChildren();
await fetchCaregivers();
}
useEffect(() => { useEffect(() => {
if (user) { if (user) {
fetchChildren(); fetchChildren();
@ -131,8 +152,7 @@ const Screen: React.FC = () => {
<Button <Button
title="Add Child" title="Add Child"
onPress={() => { onPress={() => {
handleNewChild(child); createNewSubUser(child);
fetchChildren();
}} }}
/> />
<TextField <TextField
@ -174,8 +194,7 @@ const Screen: React.FC = () => {
<Button <Button
title="Add Caregiver" title="Add Caregiver"
onPress={() => { onPress={() => {
handleNewCaregiver(caregiver); createNewSubUser(caregiver);
fetchCaregivers();
}} }}
/> />
<View margin-20> <View margin-20>

View File

@ -1,15 +1,30 @@
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; import {DarkTheme, DefaultTheme, ThemeProvider} from '@react-navigation/native';
import { useFonts } from 'expo-font'; import {useFonts} from 'expo-font';
import { Stack } from 'expo-router'; import {Stack} from 'expo-router';
import * as SplashScreen from 'expo-splash-screen'; import * as SplashScreen from 'expo-splash-screen';
import { useEffect } from 'react'; import {useEffect} from 'react';
import 'react-native-reanimated'; import 'react-native-reanimated';
import { useColorScheme } from '@/hooks/useColorScheme'; import {useColorScheme} from '@/hooks/useColorScheme';
import {AuthContextProvider} from "@/contexts/AuthContext";
import functions from "@react-native-firebase/functions";
import firestore from "@react-native-firebase/firestore";
import auth from "@react-native-firebase/auth";
import {QueryClient, QueryClientProvider} from "react-query";
// Prevent the splash screen from auto-hiding before asset loading is complete. // Prevent the splash screen from auto-hiding before asset loading is complete.
SplashScreen.preventAutoHideAsync(); SplashScreen.preventAutoHideAsync();
const queryClient = new QueryClient()
if (__DEV__) {
functions().useEmulator('localhost', 5001);
firestore().useEmulator("localhost", 5471);
auth().useEmulator("http://localhost:9099");
}
export default function RootLayout() { export default function RootLayout() {
const colorScheme = useColorScheme(); const colorScheme = useColorScheme();
const [loaded] = useFonts({ const [loaded] = useFonts({
@ -27,12 +42,16 @@ export default function RootLayout() {
} }
return ( return (
<QueryClientProvider client={queryClient}>
<AuthContextProvider>
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}> <ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
<Stack> <Stack>
<Stack.Screen name="(auth)" options={{ headerShown: false }} /> <Stack.Screen name="(auth)" options={{headerShown: false}}/>
<Stack.Screen name="(unauth)" options={{ headerShown: false }} /> <Stack.Screen name="(unauth)" options={{headerShown: false}}/>
<Stack.Screen name="+not-found" /> <Stack.Screen name="+not-found"/>
</Stack> </Stack>
</ThemeProvider> </ThemeProvider>
</AuthContextProvider>
</QueryClientProvider>
); );
} }

81
contexts/AuthContext.tsx Normal file
View File

@ -0,0 +1,81 @@
import {createContext, FC, ReactNode, useContext, useEffect, useState} from "react";
import * as SplashScreen from "expo-splash-screen";
import auth, {FirebaseAuthTypes} from "@react-native-firebase/auth";
import {useRouter} from "expo-router";
import firestore from "@react-native-firebase/firestore";
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
type ProfileType = "parent" | "child" | "caregiver" | null;
interface IAuthContext {
user: FirebaseAuthTypes.User | null,
profileType?: ProfileType,
profileData?: UserProfile
setProfileData: (profileData: UserProfile) => void
}
const AuthContext = createContext<IAuthContext>(undefined!)
export const AuthContextProvider: FC<{ children: ReactNode }> = ({children}) => {
const [user, setUser] = useState<FirebaseAuthTypes.User | null>(null)
const [initializing, setInitializing] = useState(true);
const [profileType, setProfileType] = useState<ProfileType | undefined>(undefined);
const [profileData, setProfileData] = useState<UserProfile | undefined>(undefined);
const {replace} = useRouter()
const ready = !initializing
const onAuthStateChanged = async (user: FirebaseAuthTypes.User | null) => {
setUser(user);
if (user) {
try {
const documentSnapshot = await firestore()
.collection("Profiles")
.doc(user.uid)
.get();
if (documentSnapshot.exists) {
setProfileType(documentSnapshot.data()?.profileType);
setProfileData(documentSnapshot.data() as UserProfile)
}
} catch (error) {
console.error("Error fetching user profile type:", error);
setProfileType(null);
}
}
if (initializing) setInitializing(false);
}
useEffect(() => {
const subscriber = auth().onAuthStateChanged(onAuthStateChanged);
return subscriber;
}, []);
useEffect(() => {
if (!initializing) {
SplashScreen.hideAsync();
}
}, [initializing]);
useEffect(() => {
if (ready && user) {
replace({pathname: "/(auth)"})
} else if (ready && !user) {
replace({pathname: "/(unauth)"})
}
}, [user, ready]);
if (!ready) {
return null;
}
return (
<AuthContext.Provider value={{user, profileType, profileData, setProfileData}}>
{children}
</AuthContext.Provider>
)
}
export const useAuthContext = () => useContext(AuthContext)!;

View File

@ -6,6 +6,12 @@ export interface User {
export interface UserProfile { export interface UserProfile {
userType: "parent" | "child" | "caregiver"; userType: "parent" | "child" | "caregiver";
name: string; name: string;
childrenIds?: string[];
birthday?: Date;
parentId?: string;
contact?: string;
email: string
password: string
} }
export interface ParentProfile extends UserProfile { export interface ParentProfile extends UserProfile {

View File

@ -1,13 +1,8 @@
import { useState, useEffect } from "react"; import {useState} from "react";
import { useMutation } from "react-query"; import {useMutation} from "react-query";
import auth from "@react-native-firebase/auth"; import auth from "@react-native-firebase/auth";
import firestore from "@react-native-firebase/firestore"; import firestore from "@react-native-firebase/firestore";
import { import {User,} from "./types/profileTypes";
User,
CaregiverProfile,
ChildProfile,
ParentProfile,
} from "./types/profileTypes";
type ProfileType = "parent" | "child" | "caregiver" | null; type ProfileType = "parent" | "child" | "caregiver" | null;
@ -31,50 +26,15 @@ const useAuth = () => {
.set(profileData); .set(profileData);
} }
});*/ });*/
const [user, setUser] = useState<User | null>(null); const [user, setUser] = useState<User | null>(null);
const [profileType, setProfileType] = useState<ProfileType>(null); const [profileType, setProfileType] = useState<ProfileType>(null);
const [email, setEmail] = useState<string>(""); const [email, setEmail] = useState<string>("");
const [password, setPassword] = useState<string>(""); const [password, setPassword] = useState<string>("");
useEffect(() => {
const isDevelopment = __DEV__;
if (isDevelopment) {
firestore().useEmulator("localhost", 8080);
auth().useEmulator("http://127.0.0.1:9099");
}
const unsubscribe = auth().onAuthStateChanged(async (firebaseUser) => {
if (firebaseUser) {
const userObj: User = {
uid: firebaseUser.uid,
email: firebaseUser.email,
};
setUser(userObj);
try {
const documentSnapshot = await firestore()
.collection("Users")
.doc(firebaseUser.uid)
.get();
if (documentSnapshot.exists) {
setProfileType(documentSnapshot.data()?.profileType || null);
}
} catch (error) {
console.error("Error fetching user profile type:", error);
setProfileType(null);
}
} else {
setUser(null);
setProfileType(null);
}
});
return unsubscribe;
}, []);
const handleRegister = async () => { const handleRegister = async () => {
try { try {
await createUserMutation.mutateAsync(); await createUserMutation.mutateAsync();
console.log("User registered!"); console.log("User registered!");
@ -146,9 +106,9 @@ const useAuth = () => {
try { try {
await firestore() await firestore()
.collection("Users") .collection("Profiles")
.doc(user.uid) .doc(user.uid)
.set({ profileType: type }, { merge: true }); .set({profileType: type}, {merge: true});
} catch (error) { } catch (error) {
console.error("Error saving profile type:", error); console.error("Error saving profile type:", error);
} }

View File

@ -8,6 +8,8 @@ const useCaregivers = () => {
name: "", name: "",
contact: "", contact: "",
userType: "caregiver", userType: "caregiver",
email: "test@test.com",
password: "test@test.com"
}); });
const fetchCaregivers = async () => { const fetchCaregivers = async () => {

View File

@ -9,6 +9,8 @@ const useChildren = (user: any) => {
birthday: new Date(), birthday: new Date(),
userType: "child", userType: "child",
parentId: "", parentId: "",
password: "",
email: ""
}); });
const fetchChildren = async () => { const fetchChildren = async () => {

View File

@ -0,0 +1,12 @@
import {useMutation} from "react-query";
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
import functions from '@react-native-firebase/functions';
export const useCreateSubUser = () => {
return useMutation({
mutationKey: ["createSubUser"],
mutationFn: async ({email, password, ...userProfile}: { email: string, password: string } & UserProfile) => {
return await functions().httpsCallable("createSubUser")({email, password, ...userProfile})
}
});
}

View File

@ -0,0 +1,11 @@
import {useMutation} from "react-query";
import auth from "@react-native-firebase/auth";
export const useSignOut = () => {
return useMutation({
mutationKey: ["signOut"],
mutationFn: async () => {
await auth().signOut()
}
});
}

View File

@ -0,0 +1,11 @@
import {useMutation} from "react-query";
import auth from "@react-native-firebase/auth";
export const useSignUp = () => {
return useMutation({
mutationKey: ["signUp"],
mutationFn: async ({email, password}: { email: string, password: string }) => {
await auth().createUserWithEmailAndPassword(email, password)
}
});
}

View File

@ -0,0 +1,28 @@
import {useAuthContext} from "@/contexts/AuthContext";
import {useMutation} from "react-query";
import firestore from "@react-native-firebase/firestore";
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
export const useUpdateUserData = () => {
const {user, setProfileData} = useAuthContext()
return useMutation({
mutationKey: ["updateUserData"],
mutationFn: async (newProfileData: Partial<UserProfile>) => {
if (user) {
try {
await firestore()
.collection("Profiles")
.doc(user.uid)
.set(newProfileData);
const profileData = await firestore().collection("Profiles").doc(user?.uid!).get()
setProfileData(profileData.data() as UserProfile)
} catch (e) {
console.log(e)
}
}
}
})
}

File diff suppressed because it is too large Load Diff

View File

@ -12,12 +12,11 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
5E2AAAAB828382553E0AFE4A /* Pods_cally.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6DBBD766136AC86F76B424D /* Pods_cally.framework */; }; 5E2AAAAB828382553E0AFE4A /* Pods_cally.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6DBBD766136AC86F76B424D /* Pods_cally.framework */; };
5FBBDDA247284BE0B0D73DDC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F56C9EADA6FA4AEAA71245EB /* GoogleService-Info.plist */; };
A701043C80FD45C395532756 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C73694A22A420999475DA2 /* noop-file.swift */; }; A701043C80FD45C395532756 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C73694A22A420999475DA2 /* noop-file.swift */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; }; B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
D29BD67F528397E7E85920CE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F20F68FCCB33056D70B2396B /* PrivacyInfo.xcprivacy */; }; D29BD67F528397E7E85920CE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F20F68FCCB33056D70B2396B /* PrivacyInfo.xcprivacy */; };
F3E0D64F2C5A9A32001E9A28 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F3E0D64E2C5A9A32001E9A28 /* GoogleService-Info.plist */; };
5FBBDDA247284BE0B0D73DDC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F56C9EADA6FA4AEAA71245EB /* GoogleService-Info.plist */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@ -36,9 +35,8 @@
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; }; BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
F20F68FCCB33056D70B2396B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = cally/PrivacyInfo.xcprivacy; sourceTree = "<group>"; }; F20F68FCCB33056D70B2396B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = cally/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
F3E0D64E2C5A9A32001E9A28 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; }; F56C9EADA6FA4AEAA71245EB /* GoogleService-Info.plist */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "cally/GoogleService-Info.plist"; sourceTree = "<group>"; };
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-cally/ExpoModulesProvider.swift"; sourceTree = "<group>"; }; FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-cally/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
F56C9EADA6FA4AEAA71245EB /* GoogleService-Info.plist */ = {isa = PBXFileReference; name = "GoogleService-Info.plist"; path = "cally/GoogleService-Info.plist"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = text.plist.xml; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -90,7 +88,6 @@
83CBB9F61A601CBA00E9B192 = { 83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
F3E0D64E2C5A9A32001E9A28 /* GoogleService-Info.plist */,
13B07FAE1A68108700A75B9A /* cally */, 13B07FAE1A68108700A75B9A /* cally */,
832341AE1AAA6A7D00B99B32 /* Libraries */, 832341AE1AAA6A7D00B99B32 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */, 83CBBA001A601CBA00E9B192 /* Products */,
@ -210,7 +207,6 @@
files = ( files = (
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
F3E0D64F2C5A9A32001E9A28 /* GoogleService-Info.plist in Resources */,
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
D29BD67F528397E7E85920CE /* PrivacyInfo.xcprivacy in Resources */, D29BD67F528397E7E85920CE /* PrivacyInfo.xcprivacy in Resources */,
5FBBDDA247284BE0B0D73DDC /* GoogleService-Info.plist in Resources */, 5FBBDDA247284BE0B0D73DDC /* GoogleService-Info.plist in Resources */,
@ -297,6 +293,7 @@
); );
inputPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-cally/Pods-cally-resources.sh", "${PODS_ROOT}/Target Support Files/Pods-cally/Pods-cally-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL-GRPC/openssl_grpc.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
@ -306,6 +303,8 @@
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreExtension/FirebaseCoreExtension_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreExtension/FirebaseCoreExtension_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCoreInternal/FirebaseCoreInternal_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCrashlytics/FirebaseCrashlytics_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCrashlytics/FirebaseCrashlytics_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/FirebaseFirestore_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestoreInternal/FirebaseFirestoreInternal_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/FirebaseInstallations/FirebaseInstallations_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher_Core_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher_Core_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/GoogleDataTransport/GoogleDataTransport_Privacy.bundle",
@ -313,12 +312,17 @@
"${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/PromisesObjC/FBLPromises_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/PromisesSwift/Promises_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/abseil/xcprivacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/EXDevLauncher.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-launcher/EXDevLauncher.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-menu/EXDevMenu.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/expo-dev-menu/EXDevMenu.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb_Privacy.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/gRPCCertificates-Cpp.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/grpcpp.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb_Privacy.bundle",
); );
name = "[CP] Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/openssl_grpc.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
@ -328,6 +332,8 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreExtension_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreExtension_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreInternal_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCoreInternal_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCrashlytics_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseCrashlytics_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseFirestore_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseFirestoreInternal_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseInstallations_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FirebaseInstallations_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMSessionFetcher_Core_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMSessionFetcher_Core_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleDataTransport_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleDataTransport_Privacy.bundle",
@ -335,9 +341,13 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FBLPromises_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Promises_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Promises_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/xcprivacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevLauncher.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevLauncher.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevMenu.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXDevMenu.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/nanopb_Privacy.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/grpcpp.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/grpc.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/leveldb_Privacy.bundle",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
@ -419,7 +429,7 @@
); );
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG"; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app; PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
PRODUCT_NAME = "cally"; PRODUCT_NAME = cally;
SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -450,7 +460,7 @@
); );
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app; PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
PRODUCT_NAME = "cally"; PRODUCT_NAME = cally;
SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "cally/cally-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";

View File

@ -4,6 +4,24 @@
<dict> <dict>
<key>NSPrivacyAccessedAPITypes</key> <key>NSPrivacyAccessedAPITypes</key>
<array> <array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>0A2A.1</string>
<string>3B52.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict> <dict>
<key>NSPrivacyAccessedAPIType</key> <key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string> <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
@ -14,16 +32,6 @@
<string>C56D.1</string> <string>C56D.1</string>
</array> </array>
</dict> </dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>0A2A.1</string>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
<dict> <dict>
<key>NSPrivacyAccessedAPIType</key> <key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string> <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
@ -33,14 +41,6 @@
<string>85F4.1</string> <string>85F4.1</string>
</array> </array>
</dict> </dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array> </array>
<key>NSPrivacyCollectedDataTypes</key> <key>NSPrivacyCollectedDataTypes</key>
<array/> <array/>

1293
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,8 @@
"@react-native-firebase/app": "^20.3.0", "@react-native-firebase/app": "^20.3.0",
"@react-native-firebase/auth": "^20.3.0", "@react-native-firebase/auth": "^20.3.0",
"@react-native-firebase/crashlytics": "^20.3.0", "@react-native-firebase/crashlytics": "^20.3.0",
"@react-native-firebase/firestore": "^20.3.0", "@react-native-firebase/firestore": "^20.4.0",
"@react-native-firebase/functions": "^20.4.0",
"@react-navigation/drawer": "^6.7.2", "@react-navigation/drawer": "^6.7.2",
"@react-navigation/native": "^6.0.2", "@react-navigation/native": "^6.0.2",
"expo": "~51.0.24", "expo": "~51.0.24",
@ -35,6 +36,8 @@
"expo-status-bar": "~1.12.1", "expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7", "expo-system-ui": "~3.0.7",
"expo-web-browser": "~13.0.3", "expo-web-browser": "~13.0.3",
"firebase-admin": "^12.3.1",
"firebase-functions": "^5.1.0",
"jotai": "^2.9.1", "jotai": "^2.9.1",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",