模拟推送通知(IOS5),无需 apn

发布于 2024-12-21 10:53:11 字数 325 浏览 5 评论 0原文

我想在不使用 apn 的情况下模拟推送通知。 我尝试过 HOOK SBSystemLocalNotificationAlert 并使用

[objc_getClass("SBSystemLocalNotificationAlert") presentWithLocalNotification:notification application:bundle];

但它只是一个alertview,不像ios5的通知中心,而且看起来像ios4的推送。

我想为我的守护程序(例如 MobileSMS)模拟推送通知(IOS5)。

对不起我的英语

I want to simulate push notification without using apn.
I have tried to HOOK SBSystemLocalNotificationAlert
and use

[objc_getClass("SBSystemLocalNotificationAlert") presentWithLocalNotification:notification application:bundle];

but it is just an alertview not like ios5 notification center, and it looks like ios4's push.

I want to simulate push notification (IOS5) for my daemon like MobileSMS.

sorry for my english

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

素年丶 2024-12-28 10:53:11

如果你想在没有 APN 服务的情况下模拟推送通知,你可以尝试这个库: https://github.com/acoomans/ SimulatorRemoteNotifications

也可以在模拟器中工作。

If you want to simulate push notifications without APN service, you can try this library: https://github.com/acoomans/SimulatorRemoteNotifications

Works in the simulator too.

演出会有结束 2024-12-28 10:53:11

这是一个棘手的问题。我不知道这是否可能(如果我错了请纠正我)。

但是,如果您只需要进行测试,则可以使用 Parse.com 发送推送通知。他们的基本服务(包括推送通知)是免费的,并且提供了如何集成的工作示例代码。

That's a tough issue. I do not know whether it is possible (correct me guys if I am wrong).

However if you only need this for testing, you can use Parse.com for sending push notifications. Their basic service that includes push notification is for free and they deliver a working example code how to integrate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文