export class MyNotificationDelegate implements UNUserNotificationCenterDelegate {
/**
* Constructor for MyNotificationDelegate class.
* Initializes the delegate and logs a message for debugging.
*/
constructor() {
// 在这里可以做一些初始化工作
console.log("MyNotificationDelegate 实例已创建");
}
/**
* This method is called when a notification arrives while the app is running in the foreground.
* It ensures that alerts, sounds, and badges are still shown.
*/
userNotificationCenter(
notification: UserNotifications.UNNotification ): void {
// 打印收到的通知内容,方便调试
console.log("接收到通知,内容:", notification);
console.log("abcd");
}
}
2***@qq.com
- 发布:2024-10-17 11:17
- 更新:2024-10-18 12:00
- 阅读:60
DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
看着是 ios 的通知,目前信息太少了,提供完整的 uts 源码吧,也可以私聊我,我运行试试,提供更多信息,有助于定位和解答你的问题。
2***@qq.com (作者)
我已经搞定啦
2024-10-25 13:36