How to use Expo Push Notifications in Ship Mobile Fast
@/hooks/usePushNotifications.ts
file.
With this hook, your user can get notifications in background, on lock screen, and in notification center automatically.
You don’t need to do anything else but I want to give you some hints:
@/hooks/usePushNotifications
file. You’ll see bunch of codes. But Important part is:expoPushToken
is your user’s push token. You can use this token to send push notifications to your user.sendPushNotification
is a function to send push notifications to your user.notification
is a hook to get the notification data.profiles
, likes
, comments
, etc.Get Started
button and open your terminal.supabase/functions/send-push-notification
folder. And you will see the index.ts
file.