Notifications are the technique of an application to communicate with users, especially at what time it’s not running in the forefront. A notification, as its name implies, is used to “notify” a user either about an-happening, or just to remind something important. In fact, notifications are really useful in reminding applications, but they’re also rather helpful in a number of other cases. For example, a notification can be shown when a user enters a predefined region (that’s new in iOS 8), when a download is complete, or when a friend has sent a message to a chat application. No matter what, the reason of notifications is to pull the users’ consideration, so they act on the message they see.
The significant function of both local and remote notifications is to allocate an app to notify its users that it has something for them—for example, a message or an upcoming meeting—when the app isn’t running in the forefront. The important change between local notifications and remote notifications is simple:
• Local notifications: These are notifications specified by the developer and are triggered by the app itself. The exact time that they’ll appear is always planned.
• Remote notifications: In this case, the notifications can be divide in two subcategories: (a) The push notifications, which are initiated into a web server, then go through the Apple Push Notification servers and finally they’re shown to users at the moment they appear to the device. (b) The silent notifications, which are actually push notifications, but they’re not shown to the user straight away. Instead, they’re handled internally by the application in order to perform a task, and when everything is ready, a local notification is scheduled to inform the user.
About Local notifications
Local notifications are scheduled to be fired in predefined date and time by the application itself. Always keep in mind that even though notifications are good for communicating with the user, you should be careful, as the unnecessary use of them would lead to a bad user experience.
There are several ways to inform a user about a local notification. Right next they are presented all the supported types which you can use to do that. As you may already know, you can either specify some or all of them when configuring a notification in code:
• Alert or Banner: Depending on the preferences the user sets in the Settings, a notification can be shown using either an alert view or a banner. Both of them should contain the message of the notification (which can be localized).
• Sound: You can “tell” iOS to playback either a predefined or a custom sound when the notification is fired. That’s quite useful, as in most cases users won’t look at the device all the time, so any presented notifications can be easily ignored. However, in less important notifications, sounds could be just omitted.
• Badge: A badge number can also be shown in the app’s icon when a new notification is fired. The badge number must be increased by one with a new notification, and then decreased when the notification is handled. iOS automatically shows and hides the badge, depending on whether there’s a value other than zero to display.
As it seems, notifications in iOS 8 have become a lot better, as now users can perform actions directly through them and without even launching the app.