objective c - iOS Notification Center Registration -


i want make game tests out local notifications. in ios 8, code involves these steps:

  1. make uimutableusernotificationcategory object category of custom actions want implement.
  2. make 4 custom actions using uimutableusernotificationaction instances.
  3. call setactions:forcontext: set custom actions.
  4. make uiusernotificationsettings object , call settingsfortypes:categories: on it.
  5. register application's user notification settings calling registerusernotificationsettings: on shared uiapplication instance.

my question is, uiusernotificationsettings mentioned in step 4, how register application more 1 category? values can set are:

  • uiusernotificationtypealert (show alert)
  • uiusernotificationtypebadge (show badge)
  • uiusernotificationtypesound (only play sound)
  • uiusernotificationtypenone (do nothing)

it sounds application should able show alert, display badge, , display sound. however, before notification fires, has registered of three. parameter takes nsuinteger.

my question is, how 1 make had access 3 of permissions? can't pass nsarray it, there should way i'm not seeing...

take example:

[[uiapplication sharedapplication] registerusernotificationsettings:[uiusernotificationsettings settingsfortypes:(uiusernotificationtypesound | uiusernotificationtypealert | uiusernotificationtypebadge) categories:nil]];  [[uiapplication sharedapplication] registerforremotenotifications]; 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -