2016-05-01 19 views
0

Amazon Webサービスを使用してIOSアプリケーションに「プッシュ通知」を送信しています。スウィフト2でバッジ番号を自動的に増やす方法は?AWS SNSからプッシュ通知を送信するときに自動的にバッジ番号を増やす方法はありますか?

私はAppDelegateに次のコードを使用しています:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 


    let notificationTypes : UIUserNotificationType = [.Alert, .Badge, .Sound] 
    let notificationSettings : UIUserNotificationSettings = UIUserNotificationSettings(forTypes: notificationTypes, categories: nil) 
    UIApplication.sharedApplication().registerUserNotificationSettings(notificationSettings) 
    UIApplication.sharedApplication().registerForRemoteNotifications() 

    UIApplication.sharedApplication().applicationIconBadgeNumber = 0   
    return true 
    } 
+0

http://stackoverflow.com/questions/23993903/how-to-update-the-badge-number-in-ios-push-notification –

答えて

0

あなただけの「バッジカウントをインクリメント」と言うことはできません。

明示的に送信する各プッシュ通知のバッジ数を伝える必要があります。

関連する問題