SmartPrompter Documentation Beta

Class App​Delegate

@available(iOS 10.0, *) @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate
%3 AppDelegate AppDelegate UNUserNotificationCenterDelegate UNUserNotificationCenterDelegate AppDelegate->UNUserNotificationCenterDelegate UIApplicationDelegate UIApplicationDelegate AppDelegate->UIApplicationDelegate UIResponder UIResponder AppDelegate->UIResponder

Conforms To

UIApplicationDelegate
UIResponder
UNUserNotificationCenterDelegate

Properties

window

var window: UIWindow?

Methods

application(_:​did​Finish​Launching​With​Options:​)

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool

application(_:​perform​Fetch​With​Completion​Handler:​)

func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)

Background fetch function. Tries the fetch data when the app is in background

Parameters

application UIApplication

The current application

completion​Handler @escaping (UIBackground​Fetch​Result) -> Void

checks whether new data has been fetched

application​Will​Resign​Active(_:​)

func applicationWillResignActive(_ application: UIApplication)

application​Did​Enter​Background(_:​)

func applicationDidEnterBackground(_ application: UIApplication)

application​Will​Enter​Foreground(_:​)

func applicationWillEnterForeground(_ application: UIApplication)

application​Did​Become​Active(_:​)

func applicationDidBecomeActive(_ application: UIApplication)

application​Will​Terminate(_:​)

func applicationWillTerminate(_ application: UIApplication)

application(_:​did​Register​For​Remote​Notifications​With​Device​Token:​)

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)

application(_:​did​Fail​ToRegister​For​Remote​Notifications​With​Error:​)

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)

setup​Database(_:​)

private func setupDatabase(_ application: UIApplication) throws

Sets up the internal swl database which is currently not in use

register​For​Push​Notifications()

func registerForPushNotifications()

Registers the app for push notification

get​Notification​Settings()

func getNotificationSettings()

Gets the notification settings for local notification

user​Notification​Center(_:​will​Present:​with​Completion​Handler:​)

@available(iOS 10.0, *) func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)

user​Notification​Center(_:​did​Receive:​with​Completion​Handler:​)

@available(iOS 10.0, *) func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void)

download​Notification​Sound()

func downloadNotificationSound()

Download the custom notifcation sound that's to be used