TKUITripMonitorManager

@MainActor
public class TKUITripMonitorManager : NSObject, ObservableObject

The manager for trip notifications such as “get off at the next stop” or “your trip is about to start”

Requirements:

  • Project > Your Target > Capabilities > Background Modes: Enable “Location Updates”
  • Project > Your Target > Info: Include both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription
  • Then call TKUINotificationManager.shared.subscribe(to: .tripAlerts) { ... } in your app.
  • Implement TKUINotificationManagerDelegate and set it on TKUINotificationManager.shared.delegate

Push notifications:

An additional feature is server-side notifications related to a trip being monitored. This requires additional set-up:

  • Lastly, call TKUINotificationManager.shared.subscribe(to: .pushNotifications) { _ in }