English 中文(简体)
正确使用城市空气的缓冲通知
原标题:Push Notifications using Urban Airship correctly

I tried using Urban Airship for sending push notifications to the devices. I register the device to push using: Code:

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

I created an app on Urban Airship, uploaded the certificate key and tried sending a broadcast with no success. Only when I manually added the device token to Urban Airship, I successfully sent and got a broadcast. My question is - can I use Urban Airship to send Push notifications without registering device tokens and how? If not, how do I register the device tokens automatically from the app (and not using the curl code)? Is there any other push provider which doesn t require more than Apple s basic registerForRemoteNotificationTypes: method?

感谢!

问题回答

无,如果装置没有在网络上登记,城市空气就不能发出推介通知,而是想到这一逻辑。 只是启动登记程序,并假定你做了其他工作,使这一魔鬼得以发生。

您还需要其他代表妥善登记和接收关于你的装置的普什通知。

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)_deviceToken;

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo;

除这些<代码> UIApplication代表外,您需要在didFinishLaunching WithOptions:上开设航空班。 代表:

[Airship takeOff: kApplicationKey identifiedBy: kApplicationSecret];




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签