如何以编程方式禁用 iOS 推送通知分组?

How to disable iOS push notification grouping programmatically?

ios 中有禁用推送通知分组的设置。但我想以编程方式禁用通知。有什么办法吗?

我见过的唯一解决方案是设置不同的通知组,但我不确定这是最好的:

let notificationContent = UNMutableNotificationContent()
notificationContent.title = "Hello!"
notificationContent.body = "Test notification"
notificationContent.sound = UNNotificationSound.default
notificationContent.threadIdentifier = "random_thread_identifier"
notificationContent.summaryArgument = ""