我试图让我的应用程序为推送通知做好准备,我在应用程序委托中插入了以下代码,但是当我在我的设备(iPhone 3Gs - iOS 5.1.1)上运行应用程序时,应用程序启动正常但“推送警报”如何要求用户允许通知!!!
有人可以帮忙吗??
来自德国的问候!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeSound];
// Override point for customization after application launch.
return YES;
}