How to implement Urban Airship for Push notification in iPhone?

故事扮演 提交于 2019-12-12 04:12:52

问题


I'm trying to use urbanairship push notification. But while creating instance of UAirship, it is showing error that UAirship is undeclared.i have implemented urbanairship upto http://urbanairship.com/docs/apns_test_client.html#prerequisite and after then i do not know what should i do ? Waiting for response. Thanks.


回答1:


Have you included UAirship.h and UAPush.h ?




回答2:


I got something similar just now. Might not be the same problem, but there seems to be a massive bug in the UA library - a combination of careless code design, and badly written code.

Apparently ... you MUST NOT make calls to "UAPush" until AFTER you have invoked

[UAirship takeOff:...]

This shouldn't be a problem. Firstly, UA shouldn't crash! Secondly, there's plenty of calls to UAPush that make sense before calling takeOff. So far as I can tell, this is undocumented (like most of UA, sadly :( ). i.e. I'd read through the official website and the scant docs multiple times, and never saw mention of this requirement.




回答3:


See https://docs.urbanairship.com/display/DOCS/Getting+Started%3A+iOS%3A+Push, the mostly simplest guide with pictures... Watch for the possible cases you have missed which you shouldn't have.



来源:https://stackoverflow.com/questions/5634125/how-to-implement-urban-airship-for-push-notification-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!