模拟推送通知(IOS5),无需 apn
我想在不使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果你想在没有 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.
这是一个棘手的问题。我不知道这是否可能(如果我错了请纠正我)。
但是,如果您只需要进行测试,则可以使用 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.