Post

Replies

Boosts

Views

Activity

Reply to Create user notification issues using Swift UI
import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder,UIApplicationDelegate{     func application(_ application:UIApplication,didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey:Any]?)-Bool{          //Cannot convert return expression of type 'Void' to return type 'Bool'         UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge]){(granted,error)in             if granted{                 print("User notifications are allowed.")                              }else{                 print("User notifications are not allowed.")             }                      }              } }
Mar ’21