'How can I reset a Tauri app's notification permission on macOS?

I tried to use the notification API for Tauri app on macOS. https://tauri.studio/docs/api/js/modules/notification/

I pressed the deny button when requesting notification permission for testing. And of course, it always returns 'denied' now.

I want to know how I can reset the permission or ask for notification permission again. I tried to look for the notification setting on "System Preferences > Notifications & Focus" and "Safari > Preferences > Security". But I couldn't.

import { notification } from "@tauri-apps/api";

async function testSendNotification() {
    const permission = await notification.requestPermission();
    if (permission === "granted") {
        notification.sendNotification("Notification Demo");
    }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source