Post

Replies

Boosts

Views

Activity

UNNotificationActions
Working on Local notifications with Custom Actions. The notification shows on my iPhone and includes all 3 custom actions assigned to the Category.When my iPhone is locked, the notification arrives on my Apple Watch, but the Custom Actions are not there - just the Dismiss button.Any idea what's going on here?Here's a code samplelet actionLess = UNNotificationAction(identifier: "LESS", title: "Less", options: [.foreground]) let actionMore = UNNotificationAction(identifier: "MORE", title: "More", options: [.foreground]) let action90 = UNNotificationAction(identifier: "90", title: "90min", options: [.foreground]) let category = UNNotificationCategory(identifier: "SLEEP4B", actions: [actionLess, action90, actionMore], intentIdentifiers: [], options: .customDismissAction) UNUserNotificationCenter.current().setNotificationCategories([category]) func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { completionHandler([.alert, .sound, .badge]) }
0
0
522
Dec ’19
SwiftUI onTapGesture No Longer Working in iOS 14
I have a vertical ScrollView with a custom View populating it. This custom view has a onTapGesture. It works fine on iOS 13.x, but I just loaded up Xcode 12, recompiled, and put it on a test device running iOS 14 and the taps are no longer recognized. Did I miss something at WWDC that stated this functionality is changing. I have been digging but haven't come across anything yet.
10
0
7.4k
Jun ’20