25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1 line
3.8 KiB

  1. {"variants":[{"paths":["\/documentation\/fueling\/notificationmanager\/requestauthorization()"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"title":"requestAuthorization()","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"requestAuthorization","kind":"identifier"},{"text":"()","kind":"text"}],"externalID":"s:7Fueling19NotificationManagerC20requestAuthorizationyyF","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"Fueling"}],"role":"symbol"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"requestAuthorization","kind":"identifier"},{"text":"()","kind":"text"}],"platforms":["iOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","level":2,"type":"heading"},{"type":"paragraph","inlineContent":[{"type":"text","text":"This method requests permission from the user to display notifications with alert, sound, and badge options."}]},{"syntax":"swift","code":["func requestAuthorization() {"," let options: UNAuthorizationOptions = [.alert, .sound, .badge]"," "," UNUserNotificationCenter.current().requestAuthorization(options: options) { success, error in"," if let error = error {"," print(\"Error requesting notifications authorization: \\(error)\")"," } else {"," print(\"Notifications permission granted: \\(success)\")"," }"," }","}"],"type":"codeListing"}]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"text":"Requests authorization to display notifications.","type":"text"}],"identifier":{"url":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager\/requestAuthorization()","interfaceLanguage":"swift"},"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":{"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"},"doc://rpm.com.production.Scanner/documentation/Fueling/NotificationManager/requestAuthorization()":{"title":"requestAuthorization()","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"requestAuthorization","kind":"identifier"},{"text":"()","kind":"text"}],"url":"\/documentation\/fueling\/notificationmanager\/requestauthorization()","kind":"symbol","abstract":[{"type":"text","text":"Requests authorization to display notifications."}],"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NotificationManager\/requestAuthorization()","type":"topic","role":"symbol"}}}