iOS - Rich notification

Hi, I have implemented countly notification on one of my applications. then I moved on to implement rich notification according to the documentation but it doesn't work.
it seems like this method:
- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler
{
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];

//delete existing template code, and add this line
[CountlyNotificationService didReceiveNotificationRequest:request withContentHandler:contentHandler];

}
is never being called.
I have checked it on two another one of our projects and on another server aswell.
Would appreciate your help.

0

Comments

12 comments
  • Hey @Mahan - thanks for letting us know. I have let my colleague @erkanyildiz and we'll get back to you about the issue. Have a great week ahead!

    0
    Comment actions Permalink
  • Hi @gorkem - Sorry that I am a bit late to the party. Turns out, rich notifications don't work in certain situations, including:

    • If the picture URL is "http" instead of "https".
    • If you are sending actions as notification and you don't include an "https" image.
      Although, we can take these conventions into consideration and simply learn to send notifications with certain "conditions", I see it as a waste that a company such as yourselves with such potential discourage the community with the Little things. Hope you have a great time, and you can solve these problems in no time 😃
    0
    Comment actions Permalink
  • Hi @Mahan, have you considered that ATS prevented that http image from loading?

    0
    Comment actions Permalink
  • Hi @artem - I have, but ATS regulations state that if you disable it in your application info.plist, you won't have a problem with it. and I have. So I don't think that's the problem.

    0
    Comment actions Permalink
  • Mahan:

    in your application info.plist

    this is for the application. what about the notification service extension target? have you added it to it's info plist as well?

    0
    Comment actions Permalink
  • @artem Countly Server includes mutable-content flag in push payload for action buttons, right?

    @Mahan
    Then, is it is most probably either an integration problem or notification service extension setting problem on your side.

    0
    Comment actions Permalink
  • @erkanyildiz yes it does

    0
    Comment actions Permalink
  • @erkanyildiz Yes I have. might be, but I have implemented the notification service exactly according to the documentation, that's why I don't think I have.

    0
    Comment actions Permalink
  • If the picture URL is "http" instead of "https".

    only explanation for this is that notification extension target info plist is not configured properly for non-secure connections.

    are you really sure that it was configured properly at the time when you did the test?
    can you still reproduce the issue now?

    0
    Comment actions Permalink
  • @erkanyildiz Yes, I can.

    0
    Comment actions Permalink
  • Then you have to check your info plist or overall network settings again:

    0
    Comment actions Permalink
  • I'll be implementing another application on our server in about a week or so, will double check everything and see if I did anything differently in my current projects and I'll let you know if there was. Thank you for your help though. really appreciate it.

    0
    Comment actions Permalink

Please sign in to leave a comment.