From f6bba6262e5fc4bf3cc1aa31a47dcfb748ba2413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=A1=E6=B3=8A=E6=98=8E=E5=BF=97?= <1223343444@qq.com> Date: Thu, 3 Jul 2025 10:26:32 +0800 Subject: [PATCH] Update AppDelegate.mm --- example/ios/example/AppDelegate.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/example/ios/example/AppDelegate.mm b/example/ios/example/AppDelegate.mm index a777d17..5c19260 100644 --- a/example/ios/example/AppDelegate.mm +++ b/example/ios/example/AppDelegate.mm @@ -122,6 +122,13 @@ - (void)networkDidReceiveMessage:(NSNotification *)notification { NSDictionary * userInfo = [notification userInfo]; [[NSNotificationCenter defaultCenter] postNotificationName:J_CUSTOM_NOTIFICATION_EVENT object:userInfo]; } +// 如果是 AppDelegate.swift 使用如下代码 +// @objc +// func networkDidReceiveMessage(_ notification: Notification) -> Void { +// print("networkDidReceiveMessage \(notification)") +// let userInfo = notification.userInfo +// NotificationCenter.default.post(name: .init("J_CUSTOM_NOTIFICATION_EVENT"), object: userInfo) +// } //************************************************JPush end************************************************