25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

1 satır
4.4 KiB

  1. {"metadata":{"title":"scheduleNotification()","roleHeading":"Instance Method","symbolKind":"method","role":"symbol","externalID":"s:7Fueling19NotificationManagerC08scheduleB0yyF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scheduleNotification"},{"text":"()","kind":"text"}],"modules":[{"name":"Fueling"}]},"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"scheduleNotification"},{"text":"()","kind":"text"}],"languages":["swift"],"platforms":["iOS"]}],"kind":"declarations"},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"This method schedules a notification with the title “Fueling Update” and the body “Your fueling data was saved on Device. You have {fuelingsCount} dispenses in the list.”","type":"text"}]},{"type":"codeListing","code":["func scheduleNotification() {"," let content = UNMutableNotificationContent()"," content.title = \"Fueling Update\""," content.body = \"Your fueling data was saved on Device. You have \\(fuelingsCount) dispenses in the list.\""," content.subtitle = \"Update Success\""," content.badge = (Int(fuelingsCount)) as NSNumber"," content.sound = .default"," "," let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 3.0, repeats: false)"," "," let request = UNNotificationRequest("," identifier: UUID().uuidString,"," content: content,"," trigger: trigger)"," "," UNUserNotificationCenter.current().add(request) { error in"," if let error = error {"," print(\"Error scheduling notification: \\(error.localizedDescription)\")"," } else {"," print(\"Notification scheduled\")"," }"," }","}"],"syntax":"swift"}]}],"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager"]]},"abstract":[{"type":"text","text":"Schedules a notification to indicate successful fueling data save."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager\/scheduleNotification()"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/fueling\/notificationmanager\/schedulenotification()"]}],"references":{"doc://rpm.com.production.Scanner/documentation/Fueling/NotificationManager":{"url":"\/documentation\/fueling\/notificationmanager","role":"symbol","type":"topic","title":"NotificationManager","kind":"symbol","abstract":[{"type":"text","text":"A class that manages notifications for the application."}],"fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"NotificationManager","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"NotificationManager"}],"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager"},"doc://rpm.com.production.Scanner/documentation/Fueling/NotificationManager/scheduleNotification()":{"kind":"symbol","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager\/scheduleNotification()","title":"scheduleNotification()","abstract":[{"type":"text","text":"Schedules a notification to indicate successful fueling data save."}],"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"scheduleNotification","kind":"identifier"},{"text":"()","kind":"text"}],"type":"topic","role":"symbol","url":"\/documentation\/fueling\/notificationmanager\/schedulenotification()"},"doc://rpm.com.production.Scanner/documentation/Fueling":{"kind":"symbol","url":"\/documentation\/fueling","title":"Fueling","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","abstract":[{"type":"text","text":"The Scanner app is designed to facilitate secure and efficient fuel management operations, primarily focusing on user authentication, fuel data collection, and network communication. The app includes several key features to ensure seamless and reliable interactions between users and the backend systems, leveraging technologies like WebSockets, Core Data, and biometric authentication."}],"type":"topic","role":"collection"}}}