How to add an action to notifications in Swift 2 iOS 9 <p>I'm trying to get a button in my notifications send with PHP Apns <a href="http://immobiliare.github.io/ApnsPHP/html/" rel="nofollow">http://immobiliare.github.io/ApnsPHP/html/</a></p> <p>Following this documentation from Apple: <a href="https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html#//apple_ref/doc/uid/TP40014969-CH18-SW5" rel="nofollow">https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html#//apple_ref/doc/uid/TP40014969-CH18-SW5</a></p> <p>But the buttons never show..</p> <p>My code:</p> <pre><code> var categories = NSMutableSet() var acceptAction = UIMutableUserNotificationAction() acceptAction.title = NSLocalizedString("Accept", comment: "Accept") acceptAction.identifier = "accept" acceptAction.activationMode = UIUserNotificationActivationMode.Background acceptAction.authenticationRequired = false var declineAction = UIMutableUserNotificationAction() declineAction.title = NSLocalizedString("Decline", comment: "Decline") declineAction.identifier = "decline" declineAction.activationMode = UIUserNotificationActivationMode.Background declineAction.authenticationRequired = false var inviteCategory = UIMutableUserNotificationCategory() inviteCategory.setActions([acceptAction, declineAction], forContext: UIUserNotificationActionContext.Default) inviteCategory.identifier = "cat1" categories.addObject(inviteCategory) let settings = UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: (NSSet(array: [categories])) as? Set&lt;UIUserNotificationCategory&gt;) UIApplication.sharedApplication().registerUserNotificationSettings(settings) UIApplication.sharedApplication().registerForRemoteNotifications() </code></pre> <p>My APNS code:</p> <pre><code>$push = new ApnsPHP_Push(ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION, 'dict_prod.pem'); $push-&gt;setProviderCertificatePassphrase('XXXXXXX'); $push-&gt;setRootCertificationAuthority('entrust_root_certification_authority.pem'); $push-&gt;connect(); $message = new ApnsPHP_Message("THE TOKEN"); $message-&gt;setText("Test"); $message-&gt;setSound('default'); $message-&gt;setExpiry(30); $message-&gt;setCategory('cat1'); $push-&gt;add($message); $push-&gt;send(); $push-&gt;disconnect(); $aErrorQueue = $push-&gt;getErrors(); if (!empty($aErrorQueue)) { var_dump($aErrorQueue); } </code></pre>