title: iOS push notification banner clear action button
body: <p>i want to do something when user clear notification from home screen is it possible to get trigger when user tap on clear button on push notification banner, i ended up with adding custom button on view but thats not feasible.</p>
  
  <p><a href="https://i.stack.imgur.com/J1eQT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J1eQT.jpg" alt="enter image description here"></a></p>
  
  <p>image is attached i want trigger when user tap on this clear action any idea ???</p>
  
  <pre><code>{
     “aps” : {
        “category” : “MEETING_INVITATION”
        “alert” : {
           “title” : “Weekly Staff Meeting”
           “body” : “Every Tuesday at 2pm”
        },
     },
     “MEETING_ID” : “123456789”,
     “USER_ID” : “ABCD1234”
  
  } 
  </code></pre>
  
  <p>i have done this but its adding button on view like popup </p>
  
  <pre><code>func userNotificationCenter(_ center: UNUserNotificationCenter,
         didReceive response: UNNotificationResponse,
         withCompletionHandler completionHandler: 
           @escaping () -&gt; Void) {
  
     // Get the meeting ID from the original notification.
     let userInfo = response.notification.request.content.userInfo
     let meetingID = userInfo["MEETING_ID"] as! String
     let userID = userInfo["USER_ID"] as! String
  
     // Perform the task associated with the action.
     switch response.actionIdentifier {
     case "ACCEPT_ACTION":
        sharedMeetingManager.acceptMeeting(user: userID, 
                                      meetingID: meetingID)
        break
  
     case "DECLINE_ACTION":
        sharedMeetingManager.declineMeeting(user: userID, 
                                       meetingID: meetingID)
        break
  
     // Handle other actions…
  
     default:
        break
     }
  
     // Always call the completion handler when done.    
     completionHandler()
  }
  </code></pre>