Apple held WWDC 21 on June 8, 2021 at 1:00 a.m. Beijing time. At the conference, the new version of iOS 15 was announced, and the themes of iOS were Focus, Connect, and Explore.
For those of you who are paying attention, the Focus in this topic is a new notification change in iOS 15. This post is about the new push feature in iOS 15.
The Focus model actually existed before iOS 15. The Focus model in iOS 15 is actually an evolution of the Do Not Disturbance model in the current version.
You can see that the first part is the specific mode, the default is personal, do not disturb mode, work, sleep. In fact, the four are the same as the name as a distinction, at different times to choose different modes, to bring a better notification experience. We can also manually add focus mode, set the name of focus mode, icon, and the corresponding configuration.
We can set the shared focus mode among all devices and which apps can access the user’s focus state. This function is only open to Apple’s own apps at present, and the author has not found any code or Settings that can access this function.
Phone has become the only App that can be set globally in focus mode alone, and can specify which calls to receive when focus mode is turned on.
When we click “Personal” to enter the specific focus mode, we can see that there are multiple configurations. We can set up a whitelist for some contact book members and apps that is not affected by focus mode.
You can also set whether or not to turn on Time Sensitive Notifiers, a new notification feature available in iOS 15 that we’ll discuss in a future article.
Setting the shared focus status is similar to the function of accessing the focus mode in the global setting just now, except the scope is different. However, it is still the same as the problem just above. So far, I have not found where to get the status of the focus mode. Speculated that apple will be updated in the subsequent versions (another possibility is to use getNotificationSettingsWithCompletionHandler interface to access, just get to not focus mode, where the official document description is a little fuzzy, can’t completely confirmation)
In iOS 15 and later, you can make more fine-grained adjustments to the behavior of notifications by specifying the timing of the message delivery and setting the focus mode. The notification delivery plan allows users to choose whether to receive notifications immediately or to use a digest to deliver notifications during a period of time of their choice. Mindfulness mode helps people filter notifications during periods of time they define, such as activities like sleep, work, reading, or driving.
People can whitelist selected contacts and applications in focus mode to receive notifications.
For example, in a work-centric environment, people might want to receive messages immediately from colleagues, family members, and work-related applications. People may also want to receive all time-sensitive notifications while in focused mode. Time-sensitive notifications contain basic information that people want immediately.
It is important to note that even though the focus mode may delay the delivery of the notification, the notification itself will be available immediately upon arrival.
Specify a system-defined interrupt level for each notification that the application can send. The system uses interrupt levels to help determine when to send notifications; When a communication notification arrives, the system uses the sender’s configuration to determine when to send the notification.
The system defines four interrupt levels for non-communicating notifications:
• To be Passive. People can check information, such as restaurant recommendations, at their leisure. •Active (Active, default). When information arrives, people may want to know about it, such as score updates for their favorite teams. •Time Sensitive Information that directly affects users and requires their immediate attention, such as account security issues or delivery information. •Critical. Emergency information about personal health and public safety that directly affects users and requires their immediate attention. Critical notifications are very rare and usually come from government and public agencies or healthcare applications. To use this interrupt level, you need to apply for the corresponding permissions.
The abilities corresponding to the four levels are shown in the figure above. Passive and active are the same, time-sensitive levels can override the timing push feature and focus mode, and important level notifications can even disable phone calls and mute Settings.
With this new feature, we’ve seen some of Apple’s historic design thinking. Apple wants developers to be able to set the urgency level of each notification exactly to build trust.
Users have several ways to adjust the way they receive notifications from your application, such as turning off all notifications. Therefore, you must be as realistic as possible when assigning interrupt levels. I don’t think you want the user to feel like you’re interrupting their work with a high-level notification, but the message is a low-level message, and it’s likely to cause the user to turn off notifications from your App.
The first time your application receives a time-sensitive notification, the system describes how the notification works, and provides a way to turn off the notification if the user disagrees that the information requires immediate attention.
Do not use time-sensitive interrupt levels to send marketing notifications. Users may have agreed to receive marketing notifications from your app, but such notifications should not violate the focus mode or scheduled notification delivery Settings.
A large part of the paragraph about interrupt level is translated from the original Apple text. If you are interested, you can take a look.
The author tried to verify the experience of different interrupt levels through the full link. However, IOS 15 has just been released and is in the early stage. In the documents of “generating a remote notification” and “sending notification request to APNS”, no relevant information has been found for the time being, so it cannot be measured.
So I switched to the idea that the API hadn’t been updated, but the code might have been, so I updated the Xcode 13.0 beta and looked at the framework API.
We can in the frame of the < UserNotifications/UserNotifications. H > find the latest iOS 15 related code, In the < UserNotifications/UNNotificationContent. H > can we see a new enumeration of interrupt level.
If we look at the English description, we can see the difference between passive and active interrupt levels. The passive interrupt level will not light up and play the push sound, and will only be added to the notification list (Notification Center, I should say), while the active level, which is the default, will be immediately displayed and lit up to play the push sound.
In addition, there are corresponding new attributes.
InterruptionLevel should be well understood as the interrupt level of the push. In addition, you can also see a property called relevanceScore, the level of relevancy score will affect the ranking in the notification center, which has been mentioned in WWDC, but is not mentioned in Apple notification guide document, this property should also be set in APNS API.
Those who don’t want to download the Xcode beta right now, but want to keep up to date with the latest API, can also find it in the official iOS documentation.
Xcode is getting bigger and bigger
The last thing I want to talk about is a timed push summary, and I’ve talked a lot about the one that actually sends out push notifications.
Since the official APNS API has no update restrictions, I haven’t fully understood the specific logic of timing push feeds. Let’s first look at the Settings section in iOS 15.
In the notification interface, we added an entrance to push the summary regularly. We turned on this function, and then set the function to push the summary several times a day according to the time. We need to select specific APP to adapt to this configuration, and the default is to turn it off completely. For example, if I set up a notification digest to be sent four times a day, it would not appear immediately when the notification is sent, but instead when the digest is sent.
But actual phenomenon is like that, I sent a notice, immediately received, then, for example, five in the afternoon I bit message is pushed into a new category called night and expectations are different, speculated that it may be because the default message type is active, passive type of message may need to send to trigger this function.
For the abstract, there are still many uncertain things to be explored.
So here, about the notice on the iOS 15 new features of a preliminary study was over, the author at the time of writing this article still think iOS 15 now is still in a Beta version of the early stage, refer to the document found part of the function is still in the stage of not completely let go, according to apple’s habit before release the GM version should also have some adjustments, The content in this article is subject to change, so please stick to the latest iOS 15 release.
Thank you for reading 😅. This article was written on June 21, 2021, the first Beta release of iOS 15.