iOS: open the app (foreground, background, closed) when a notification is received - ios

I'm a manufacturer of intrusion alarm systems. Now I'd like to send an alarm (a very critical event) to the mobile phone of the user. However it's not acceptable to have a "standard" notification in the tray bar, because the user could ignore it at first. Or another notification could stop my notification.
I'd like to mimic the behaviour of the phone when an incoming call arrives: custom ringtone starts playing for many seconds, the display backlight activates, the vibration starts and so on. Only when the user taps something the ringtone should stop (or after many seconds or minutes).
I think the best method to send messages to a mobile device is through push notifications. However I don't know if the push notification could wake my app, even if it is in background or stopped.
It seems only apps targeting VoIP application can behave in this way. However my app isn't a real VoIP app, so there's a possibility Apple will not accept it.

Related

Is there a way to get iOS System alarm notifications?

I'm coding a timer app, and I've noticed a major drawback: while I can make the alarm send the user a notification when the timer is done, it can only send notifications, while the built-in Clock app triggers a fullscreen alert no matter what screen you are on, ensuring the user sees the end of the timer. Is there any way to integrate my app with iOS to allow this fullscreen alert functionality? I send a notification when the alarm finishes - is there a specific type of notification that I need to send?
Unfortunately not. You have to stay within the confines of your app. The iOS Clock app has special privileges because...well, it's made by Apple.
Is the notification not enough? I would think that would alert the user adequately.

How can a iOS app push a local notification after killed when the wifi and cellular is closed?

I discover an app, called 2n mobile key. I have some doubts about this app. First, I close the wifi, cellular, and switch on the Bluetooth, then I open the app, everything is fine. And then, I kill the app, and open the control center, close the Bluetooth, I got a local push(I have closed the wifi and cellular). I don't know how the app can push the local notification. I doubt the app isn't killed, it is still alive in the background. But, how can it do it?
The notification feature is called "notification extension", so I think it is kind of alive in the background or we can say alive in the system.
Local Notification should be registered and scheduled after getting permission granted.
Application can schedule local notification for delivery to user even though wifi or cellular have turned off. because notification should be delivered to user from iOS (Operating System)
Documentation
Local notifications give you a way to alert the user at times when your app might not be running. You schedule local notifications at a time when your app is running either in the foreground or background. After scheduling a notification, the system takes on the responsibility of delivering the notification to the user at the appropriate time. Your app does not need to be running for the system to deliver the notification.
If your app is not running, or if it is in the background, the system displays local notifications directly to the user. The system can alert the user with an alert panel or banner, with a sound, or by badging your app’s icon. If your app provides a notification content app extension, the system can even use your custom interface to alert the user. If your app is in the foreground when a notification arrives, the system gives your app the opportunity to handle the notification internally.
https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/SchedulingandHandlingLocalNotifications.html#//apple_ref/doc/uid/TP40008194-CH5-SW5

How can I reschedule all of my phone's remote (Push) notifications to specific time? is it possible in iOS?

I am working on one iOS App in which I want to read all incoming remote notifications and reschedule them to my desired time.
So Let's say, I have reschedule all of my phone's push notification to 10am in morning, so all of my Phone notifications would come only at 10am in my Phone and there would be no any other notification except this time.
is this feasible in iOS? Does Apple allow this?
I assume you mean all notifications, not just ones from an app you may be developing. In which case, no, it's not possible to affect when the notifications are shown.
You could simply just turn your phone off (or put it in Airplane Mode) and turn it back on at 10am. :)
Apple does provide "Do Not Disturb" as a feature however. This doesn't stop notifications from arriving, but they don't alert the user when they do arrive. Instead there'll just a be a list of notifications waiting for you when you pick up your phone.

iOS PushKit ring phone

I'm developing a VoIP app with Apple's PushKit. I am able to receive notifications when the app is in background or even when it's not running. However, I don't know how to turn on the display and ring the phone when it's necessary, like in case of incoming VoIP call.
You can schedule local notification, with push kit or anything never you app will come foreground, never phone will turn on.
With use of local notification you can set sound file for 30 seconds.
You can repeat at every 30 seconds until user act on local notification.
Local notification could have action buttons.

waking up ios applications without using ios notification

Is it possible to wake up a background application with a non ios notification center? e.g. if I were creating a calling or messaging application is it possible to wake the application via SMS.
Nope. If you want to call app outside the device, you should use APNS. On the device you can use local notification. Sending SMS to wake up app is kinda wrong. People don't like such solutions - imagine bunch of SMS every day for different apps. Sorry.
No.
If you have background code running, you can schedule a local notification to yourself. If the user clicks "Ok" then you will come to the foreground. See here for a description and sample code.
As far as I can tell, the only ways to launch an app without user input is via a custom URL handler or via an accessory. It doesn't sound like an accessory fits your use case. Sadly you can't open URLs from the background, so you can't use this to wake yourself.

Resources