unnotificationtrigger

    1熱度

    1回答

    我使用UNUserNotification向用戶發送本地通知。我想在我從時間選取器計算的開始時間首先發送通知。在第一次通知後,我想每15分鐘發一次提醒。有沒有辦法設置日曆的觸發器和時間間隔? let dateFormatter = DateFormatter() dateFormatter.dateFormat = "HH" let hour = dateFormatter.s

    0熱度

    1回答

    我原來的問題: 當用戶設定鬧鐘19:00,我想顯示在一個提醒: 19:03 19: 09 19:12 如果他沒有與通知進行交互。 (該應用程序應該能夠離線運行,因此無法使用推送通知來喚醒該進程的應用程序,正如您所知,本地通知不會喚醒應用程序)。 因此,每次用戶安排提醒時,我都會嚴格安排4(1個原創和3個重複),如果用戶與通知進行交互,我會刪除所有其他內容。 問題是,通知每天都會重複(每週1,2,3

    4熱度

    1回答

    我有一個包含我的日期的數組。我想在上午6點30分安排那些日子的通知。 我跟着appcoda tutorial它幫助安排通知從日期選擇器輸入很好,但我有點不確定如何調用我的函數安排通知只有給定的日子。 所以我的問題是如何以及在哪裏調用該函數? 的日子已經連續多日 我可以給該函數的開始日期,並在陣列中的項目數重複一次嗎? 下面是我的函數: func scheduleNotification(at da

    1熱度

    1回答

    在iOS 10中,我使用了新的frameWork UNNotification。當設置UNNotificationTrigger時,我想在UNNotification上設置一個激發日期。但是我無法在UNNotificationTrigger的屬性中找到設置火災日期。那麼我如何在UNNotificationTrigger中設置一個激活日期。我想設置UNNotificationTrigger火災日期,

    0熱度

    1回答

    我需要製作本地通知,每天在19:30提醒用戶。 這裏是我做的: var dateComponents = DateComponents() dateComponents.hour = 19 dateComponents.minute = 30 let trigger = UNCalendarNotificationTrigger(dateMatching: dateC

    1熱度

    1回答

    這是我UNUserNotification func scheduleNotification() { UNUserNotificationCenter.current().getNotificationSettings { (notificationSettings) in switch notificationSettings.authorizationStatus