[英]ios - when opening a push notification while the app is active, it cases a crash
I am testing push notifications. 我正在测试推送通知。 I have this scenario: 我有这种情况:
When I am on a random screen, and I get a push notification and open that notification, the system tries to take me to the screen which the push notification forces. 当我在随机屏幕上并且收到推送通知并打开该通知时,系统会尝试将我带到推送通知强制执行的屏幕。 And that causes what seems to be a segue error: 这导致似乎是segue错误:
Mar 31 11:08:52 ancient-phone Marketing[14788] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[LoginController openBusinessTopic]: unrecognized selector sent to instance 0x1c5b3ae0'
*** First throw call stack:
(0x318412a3 0x394db97f 0x31844e07 0x31843531 0x3179af68 0x40ae3 0x337f290d 0x337f1f6b 0x33649d59 0x336496cd 0x3364911b 0x3534a5a3 0x3534a1d3 0x31816173 0x31816117 0x31814f99 0x31787ebd 0x31787d49 0x353492eb 0x3369d301 0x404ff 0x39912b20)
How can I prevent this? 我该如何预防? And what is the reason that this happens? 发生这种情况的原因是什么? And is there a way to handle this? 有办法解决吗?
Thanks! 谢谢!
Your error says that LoginController
is being sent a openBusinessTopic
message, and that this class does not implement that method. 您的错误表明LoginController
正在发送openBusinessTopic
消息,并且此类未实现该方法。 You can either implement openBusinessTopic
in your LoginController
class, or try to figure out if there is a different object that should have been sent that message. 您可以在LoginController
类中实现openBusinessTopic
,或者尝试确定是否应该向该消息发送另一个对象。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.