CleverTap / CTNotificationContent

A Notification Content Extension class to display custom content interfaces for iOS 10 push notifications
MIT License
14 stars 7 forks source link

Can provide the API to custom actions for different notifications. #4

Closed archerx3 closed 6 years ago

archerx3 commented 6 years ago
- (void)didReceiveNotificationResponse:(UNNotificationResponse *)response
                     completionHandler:(void (^)(UNNotificationContentExtensionResponseOption))completion {
    UNNotificationContentExtensionResponseOption actionResponseOption = [self.contentViewController handleAction:response.actionIdentifier];
    completion(actionResponseOption);
}
- (UNNotificationContentExtensionResponseOption)handleAction:(NSString *)action
{
   // If can open some API, to handle custom action
}

We can custom more actions using code, the category is not "CTNotification". But, can not handle the action event by ourself.

So, can provide?

Aditi3 commented 6 years ago

Hey @archerx3

Apologies for the delay.

True, you can't handle custom actions for CTNotificationContent, the library provides a class to accomplish Image Slideshow view.

This is because when you use the Image Slider option provided by CleverTap, we need CTNotification category to enable transition between multiple images.

If you want to register your own actions which let you perform a function on a click, I would recommend that use CTNotificationService library that adds media attachments (image, gif, video, audio) to iOS push notifications.

Thanks!

Aditi3 commented 6 years ago

Closing the issue, If you have more questions or concerns you can always reach out to the CleverTap support team at support@clevertap.com.