{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-mobilehub-helper-ios/issues/1","repository_url":"https://api.github.com/repos/aws/aws-mobilehub-helper-ios","labels_url":"https://api.github.com/repos/aws/aws-mobilehub-helper-ios/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-mobilehub-helper-ios/issues/1/comments","events_url":"https://api.github.com/repos/aws/aws-mobilehub-helper-ios/issues/1/events","html_url":"https://github.com/aws/aws-mobilehub-helper-ios/issues/1","id":172258884,"number":1,"title":"Register to Push notification with Categories","user":{"login":"YanivMsh","id":18050874,"avatar_url":"https://avatars.githubusercontent.com/u/18050874?v=3","gravatar_id":"","url":"https://api.github.com/users/YanivMsh","html_url":"https://github.com/YanivMsh","followers_url":"https://api.github.com/users/YanivMsh/followers","following_url":"https://api.github.com/users/YanivMsh/following{/other_user}","gists_url":"https://api.github.com/users/YanivMsh/gists{/gist_id}","starred_url":"https://api.github.com/users/YanivMsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YanivMsh/subscriptions","organizations_url":"https://api.github.com/users/YanivMsh/orgs","repos_url":"https://api.github.com/users/YanivMsh/repos","events_url":"https://api.github.com/users/YanivMsh/events{/privacy}","received_events_url":"https://api.github.com/users/YanivMsh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-20T07:30:50Z","updated_at":"2016-08-20T08:13:24Z","closed_at":"2016-08-20T08:13:24Z","body":"Hi, It will be nice if the AWSPushManager will register to push notification with Custom categories.\r\nI implemented it by myself in the following solution.\r\n\r\n`\r\nstatic NSSet<UIUserNotificationCategory *> * _pushCategories = nil;\r\n\r\n+(void)registerPushNotificationCategories:(NSSet<UIUserNotificationCategory *> *)categories {\r\n    \r\n    _pushCategories = categories;\r\n}\r\n\r\n- (void)registerForPushNotifications {\r\n    UIApplication *application = [UIApplication sharedApplication];\r\n    UIUserNotificationType types = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;\r\n    UIUserNotificationSettings *notificationSettings = [UIUserNotificationSettings settingsForTypes:types\r\n                                                                                         categories:_pushCategories];\r\n    [application registerUserNotificationSettings:notificationSettings];\r\n    [application registerForRemoteNotifications];\r\n}\r\n\r\n`\r\n\r\nbecause that the resigerForPushNotifications called when class created I added it as a static property.\r\n\r\nThanks"}}
{"actor":{"display_login":"YanivMsh"}}