Sandman Expert Licensed User Longtime User Feb 22, 2022 #1 If we slide a notification to the left, Options will appear, next to Clear: (Picture taken from this article.) It's possible for the app to add at least one entry to that list. Looking closer in the picture top right, we can see a Configure in Twitter, which I imagine would open a Twitter webpage: And for Messages, there's an Add to Contacts: Do we have a way of adding options to that list? I'm sorry I don't have a correct dev page at Apple to link to, I haven't even been able to figure out the correct, technical name of these notification actions. (I did find the thread Notifications with actions, and hoped that those actions would be displayed in this list, but that didn't work.)
If we slide a notification to the left, Options will appear, next to Clear: (Picture taken from this article.) It's possible for the app to add at least one entry to that list. Looking closer in the picture top right, we can see a Configure in Twitter, which I imagine would open a Twitter webpage: And for Messages, there's an Add to Contacts: Do we have a way of adding options to that list? I'm sorry I don't have a correct dev page at Apple to link to, I haven't even been able to figure out the correct, technical name of these notification actions. (I did find the thread Notifications with actions, and hoped that those actions would be displayed in this list, but that didn't work.)
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2022 #2 Sandman said: (I did find the thread Notifications with actions, and hoped that those actions would be displayed in this list, but that didn't work.) Click to expand... It does look similar to this feature. Have you tried to add a single action? Upvote 0
Sandman said: (I did find the thread Notifications with actions, and hoped that those actions would be displayed in this list, but that didn't work.) Click to expand... It does look similar to this feature. Have you tried to add a single action?
Sandman Expert Licensed User Longtime User Feb 23, 2022 #3 As I'm only working with local notifications I blindly used only the code you posted in #4, but just now I realized that I also needed code from #1. So I added that, and all of a sudden the style of actions from that thread appeared. (Where the options show like this.) The two options didn't appear like in the images above though. My next was to be to remove one of the actions to see if there's some sort of limit where the options list show actions iff there's one action. ...but I ran into some problems. Will update here once I have that figured out. :-( UPDATE: Problem solved, and I have posted the result of the test below. Last edited: Feb 24, 2022 Upvote 0
As I'm only working with local notifications I blindly used only the code you posted in #4, but just now I realized that I also needed code from #1. So I added that, and all of a sudden the style of actions from that thread appeared. (Where the options show like this.) The two options didn't appear like in the images above though. My next was to be to remove one of the actions to see if there's some sort of limit where the options list show actions iff there's one action. ...but I ran into some problems. Will update here once I have that figured out. :-( UPDATE: Problem solved, and I have posted the result of the test below.
Sandman Expert Licensed User Longtime User Feb 24, 2022 #4 So now I tried the code with only a single action, and it didn't work. It did show up below, just as it did when it was two, but it didn't show up in Options. Upvote 0
So now I tried the code with only a single action, and it didn't work. It did show up below, just as it did when it was two, but it didn't show up in Options.
Alexander Stolte Expert Licensed User Longtime User Feb 24, 2022 #5 no idea what you are doing wrong. It works for me and I use the code I showed you yesterday. Upvote 0
Sandman Expert Licensed User Longtime User Feb 24, 2022 #6 Alexander Stolte said: It works for me Click to expand... Does it? To the left I see you using the code you posted yesterday. But on the right, which action did you add to that list? Upvote 0
Alexander Stolte said: It works for me Click to expand... Does it? To the left I see you using the code you posted yesterday. But on the right, which action did you add to that list?
Alexander Stolte Expert Licensed User Longtime User Feb 24, 2022 #7 Sandman said: Does it? To the left I see you using the code you posted yesterday. But on the right, which action did you add to that list? Click to expand... Right is from the system, you probably need another library for that. I see that WhatsApp has another point. Upvote 0
Sandman said: Does it? To the left I see you using the code you posted yesterday. But on the right, which action did you add to that list? Click to expand... Right is from the system, you probably need another library for that. I see that WhatsApp has another point.
Sandman Expert Licensed User Longtime User Feb 24, 2022 #8 Yeah, the one on the right seems to have a number of actions that are same for all notifications, but if you look in #1 in this thread you'll see that Twitter and Messages somehow have an extra action in there. That's what this thread is about, if it's possible for us to get an extra action in there. Upvote 0
Yeah, the one on the right seems to have a number of actions that are same for all notifications, but if you look in #1 in this thread you'll see that Twitter and Messages somehow have an extra action in there. That's what this thread is about, if it's possible for us to get an extra action in there.
Alexander Stolte Expert Licensed User Longtime User Feb 24, 2022 #9 iOS 15: Enabling "Configure in App" option for notifications In iOS 15, the notifications center got a bit of an overhaul. It's now possible to swipe a notification to the left and choose between some "Options". All of these options relate to the stackoverflow.com looks like you can't customize anything there except show the "Configure in the app" button Upvote 0
iOS 15: Enabling "Configure in App" option for notifications In iOS 15, the notifications center got a bit of an overhaul. It's now possible to swipe a notification to the left and choose between some "Options". All of these options relate to the stackoverflow.com looks like you can't customize anything there except show the "Configure in the app" button
Sandman Expert Licensed User Longtime User Feb 24, 2022 #10 Good catch! Ok, so it's not possible to add just any action there, but we can do something so the OS adds a "Configure in App" action. This seems to be the relevant Apple page: providesAppNotificationSettings | Apple Developer Documentation An option indicating the system should display a button for in-app notification settings. developer.apple.com (I'm knowingly ignoring the fact that Messages managed to get another action in there. I'm going to assume Apple can add actions as they wish to their own apps - something that doesn't seem possible for the rest of us.) Upvote 0
Good catch! Ok, so it's not possible to add just any action there, but we can do something so the OS adds a "Configure in App" action. This seems to be the relevant Apple page: providesAppNotificationSettings | Apple Developer Documentation An option indicating the system should display a button for in-app notification settings. developer.apple.com (I'm knowingly ignoring the fact that Messages managed to get another action in there. I'm going to assume Apple can add actions as they wish to their own apps - something that doesn't seem possible for the rest of us.)