unnotificationrequest

    0熱度

    1回答

    我創建一個UNNotificationRequest與UNNotificationSound爲使用文件的.caf我有一個藍色的文件夾: content.sound = UNNotificationSound(named: "alarmSounds/alarmAscending.caf") 聲音是在文件夾(藍色)alarmSounds在主項目文件夾中。 使用的聲音始終是默認聲音,而不是我的聲音。

    0熱度

    1回答

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

    0熱度

    1回答

    我想使用iOS 10上的UserNotificationFramework發送自己的僅數據通知 - 即沒有用戶面對文本或聲音。基本上可以使用它作爲持久性定時器來觸發應用程序,如果在觸發時運行,檢查是否會因爲令牌過期而導致會話超時。 有點像本地通知中的「內容可用」無臉推送通知的類比。 我有這一切工作,除非我不能得到一個通知,沒有某種用戶面臨的數據需要參與火災。 這裏是UNNotificationRe

    0熱度

    1回答

    有沒有什麼方法可以檢索什麼類型(local或remote)通知已被觸發userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:? 我正在爲我的應用程序開發某種內部分析模塊。在每個應用程序中,我需要從通知userInfo和通知類型(本地或遠程)向我們的分析服務器發送特定信息。 要獲得userInfo我用下

    1熱度

    1回答

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

    1熱度

    2回答

    我試圖在應用程序的前臺很多得到修改通知.... 通過創建Notification Service Extensions 背景和殺害成功修改,但僅在前臺獲取警報主體中的原始有效負載不在通知中。 這裏 在NotificationService.m文件 @implementation NotificationService - (void)didReceiveNotificationRequest:(

    5熱度

    1回答

    我知道本地通知的限制爲64,UILocalNotification。它寫在Apple Dev Docs。但UILocalNotification已在iOS 10中棄用。相反,Apple建議使用UNNotificationRequest。但Apple Dev Docs沒有說任何關於限制通知計數的內容。 我發現這個answer,但它沒有鏈接到Apple Dev Docs或類似的東西(這只是一個意見)。

    1熱度

    1回答

    我想從一個本地通知在iOS的行動10. 我按照Launch a local notification at a specific time in iOS來實現應用程序啓動(從非激活狀態)和應用程序響應啓動罰款本地通知。但是我想從這裏得到的是針對通知中的數據執行操作。 在iOS中8,9我有設置在AppDelegate中 func application(_ application: UIApplic

    1熱度

    1回答

    我正在和UNNotificationRequest一起工作,我希望當我點擊按鈕時立即彈出通知。但在這種情況下,它會在我退出應用程序時出現。 這裏是我的代碼 @IBAction func shortNotifBtn(_ sender: Any) { let center = UNUserNotificationCenter.current() let content = UNMu

    0熱度

    1回答

    由於UILocalNotification現已被棄用,我將我的代碼移至新的UNNotificationRequest API。 它指出:「cancelLocalNotification」在iOS的10.0已被否決:使用UserNotifications框架的-[UNUserNotificationCenter removePendingNotificationRequestsWithIdentif