I'm trying to send push notifications to a certain user when a certain function executes !
I have seen that Firebase cloud messaging is no supported on IOS , so i switched to expo-notifications
and i have seen tutorials but all of them require a backend server to send these notifications ! and m using firebase as my backend ( firebase firestore ) ! So can that be possible to do with firebase only ?
I wanna send the notification when this function executes
const onCancel = async (dateDetails) => {
setIsSubmitting(true);
if (!dateDetails.accepted) {
await deleteDoc(doc(db, "Dates", dateDetails.dateId)).then(() => {
setIsSubmitting(false);
Toast.show({
topOffset: 60,
type: "success",
text1: "Date Deleted Successfully",
text2: " ",
});
});
fetchMyDates().then((res) => {
setNewDatesOnChild(res);
});
//Show a toast
} else {
setIsSubmitting(false);
Alert.alert(
"Your order has already been accepted Please call this number to Cancel your order !"
);
}
};
If there is another way of sending push notifications Please let me know