LocationNotificationTrigger for local notification

  1. SDK Version: Latest (38.0.8)
  2. Platforms(Android/iOS/web/all): iOS
  3. expo-notifications Version: 0.3.3

Hi all,
I was wondering if it is possible to implement the LocationNotificationTrigger for a scheduled notification. The latest expo-notifications doc states that the NotificationTriggerInput type

export type NotificationTriggerInput =
  | null
  | DateTriggerInput
  | TimeIntervalTriggerInput
  | DailyTriggerInput
  | CalendarTriggerInput;

does not accept a LocationNotificationTrigger. NotificationTriggerInput is the type that is passed in to scheduleNotificationAsync. I was wondering if there was a way to implement a LocationNotificationTrigger through scheduleNotificationAsync (without having to deal with push notifications.)

types for people who don’t want to go digging in the docs

export interface NotificationRequestInput {
  identifier?: string;
  content: NotificationContentInput;
  trigger: NotificationTriggerInput;
scheduleNotificationAsync(notificationRequest: NotificationRequestInput): Promise<string>

It seems that Apple docs state that the UNLocationNotificationTrigger is able to be called locally.

Create a UNLocationNotificationTrigger object when you want to schedule the delivery of a local notification when the device enters or leaves a specific geographic region

UNLocationNotificationTrigger inherits from UNNotificationTrigger which is the iOS version of NotificationTrigger within expo.

Any ideas of the feasibility of this feature?

Hi! We don’t support this right now, but you could probably get something just like it to work while staying in the managed workflow by using local notifications in tandem with the expo-location geofencing methods

Edit: expo-notifications does support this now - LocationNotificationTrigger

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.