我需要在我的应用程序中实现推送通知。 其实我必须从服务器接收消息。 请引导我如何在我的iPhone应用程序中实现推送通知。Iphone应用程序中的推送通知
回答
你需要在你的应用程序
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
//NSLog(@"Entered into Method");
NSString *myDevTokenString = [devToken description];
NSLog(myDevTokenString);
self.tokenAsString = [[devToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
NSLog(@"token As String:%@", tokenAsString);
//const void *devTokenBytes = [devToken bytes];
//NSLog(@"My Token is : %@",devToken);
//self.registered = YES;
// UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient-GotToken" message:myDevTokenString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
// [myAlert show];
// [myAlert release];
//[self sendProviderDeviceToken:devTokenBytes]; // custom method
}
- (void)application:(UIApplication *)app didFailToRegisterForRemoteNotificationsWithError:(NSError *)err {
//UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@"APNClient" message:@"called -Error- Method" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
// [myAlert show];
// [myAlert release];
NSString *errText = [[NSString alloc] initWithFormat:@"APN Error:%@",err];
NSLog(@"Error in registration. Error: %@", errText);
}
有没有别的东西我想do.just问,因为我已经在iPhone应用ABT豪华通知没有详细的想法 – 2010-04-01 11:40:33
在客户端没有什么... – 2010-04-01 12:20:36
一件事您需要使用推送通知启用提供配置文件来构建您的应用 – 2011-01-25 05:32:28
客户端的东西很容易实现这两个委托方法,但如果你想有一个很好的例子,我们提供一个可以下载的http://bitbucket.org/urbanairship/push_sample/
你”我发现服务器端的东西要困难得多,因此我会推荐使用Urban Airship,因为我们提供了一个简单的RESTful服务,您可以使用大量的附加功能,而独立软件包是免费的。
http://urbanairship.com/docs/push_index.html
警告:我在那里工作。
- 1. 推送iPhone应用程序的通知
- 2. iPhone应用程序推送通知
- 3. iPhone推送通知程序
- 4. 我想用推送通知我的应用程序的IPhone
- 5. Android应用程序的推送通知
- 6. 我如何在iphone应用程序中推送通知?
- 7. Facebook的聊天在iPhone应用程序使用推送通知
- 8. 通用iPhone推送应用程序
- 9. iPhone推送通知的Web应用程序?
- 10. iPhone推送通知不Rails应用程序的工作 - apn_sender
- 11. 应用程序更新推送通知
- 12. iOS应用程序推送通知
- 13. 推送通知web应用程序
- 14. 从应用程序推送通知
- 15. 离子推送通知应用程序
- 16. 推送通知应用程序
- 17. 注册iPhone应用程序推送通知不起作用
- 18. 推送通知?Iphone
- 19. 推送通知iPhone
- 20. iPhone推送通知
- 21. iPhone推送通知
- 22. iPhone - 推送通知
- 23. 推送通知不适用于应用程序商店应用程序 - iphone
- 24. 当应用程序未运行时获取推送通知iPhone
- 25. 退出iPhone应用程序后推送通知
- 26. 推送通知提醒打开iPhone时解锁应用程序
- 27. 如何从iPhone应用程序测试Apple推送通知?
- 28. 将邮件从Azure应用程序推送到没有Apple推送通知的MonoTouch(iPhone)应用程序
- 29. 推夏普发送推送通知到IOS应用程序
- 30. Devicetoken的iphone推送通知?
不要忘了接受的答案,帮助你 – 2011-05-24 05:46:06