Is there a way to suggest user to unlock the device when receiving a video call? - ios

I'm receiving an incoming video-call (the app is in background), displaying system UI. When I slide to answer - call starts and there's a button to open the app. Can I somehow programmatically press this button on answering or suggest user to unlock his device without tapping app button?

Without use of a 3rd party API or a jailbroken iPhone, this is not possible. However, it would be possible to send a notification to the user to unlock their device.

Related

CallKit: Launch app when screen is locked

I have implemented callkit to receive the VoIP notification.
On accept the call I am managing calls through another third party ForzenMountain which has my custom screen to show the status of calls.
1) When screen is not locked: Call comes then it shows two button. On accept it goes into the app itself and I can manage all.
Problem:
2) When screen is locked: It show another transition which has multiple option like (speaker/keypad/mute/addcall) rather than to go into app.
I need to land on my app even my device is locked (if passcode enable then ask to enter it) so that I can manage FM and my custom calls screen.
Unfortunately, there's no way to go directly into your app if the phone is locked. The system will only display the native CallKit UI and from there you can tap on the bottom right button to go into your app.

How can I detect lockscreen status to choose between CallKit and LocalNotification for incoming calls?

How to detect phone lockscreen status in a PushKit delegate to choose between notifying the Call to CallKit or using a LocalNotification to notify the user. The aim is to avoid having users actually have to Tap the video button when answering from lockscreen (Because more often then not, test users can't figure it out and get frustrated).
We have a Chat application written in Xamarin that supports audio/video calls over WebRTC.
On iOS incoming calls when the app is in the background or closed are handled using PushKit.
We also implemented CallKit looking to get a more native feel.
But when we receive a call on a locked screen iOS device, after answering CallKit UI stays on top, and we can only move to video call if the user taps the button.
The fact is that CallKit UI answering behavior is inconsistent between Foreground, Background and Locked states, and our users usually can't figure out why they are not getting the App Call UI after answering on locked screen.
We noticed that WhatsApp has worked around the problem by reverting to a visible notification when the screen is locked, and only seems to use CallKit when unlocked, but we can't figure out how to replicate this behavior.
How can we reliably detect Phone lock screen status in our PushKit delegate?
We have tried monitoring screen brightness, but it always gives the same value regardless of state.

How can you use a button to send a vibrational pattern to another iOS device in swift?

The user enters another user's phone number. If both people are inside the app simultaneously, each user can tap a big button which makes the other person's device vibrate simultaneously. How can I make the button make the other person's iOS device vibrate?
You need to establish some line of communication between the two devices. This is a very vague question, in general, but to get immediate vibration, you'll want some server communicating over a socket with both devices. If one device presses the button, it tells the server to vibrate the other device. The server then tells the other device to vibrate.

Is it possible to have a "notification only" app, or NOT show the watch app after a notification is displayed?

The iOS app I'm working on for a client currently only uses Apple Watch for notifications.
When a local notification fires while the user's phone is locked, it displays the notification on the phone. The user can dismiss the notification or click on one of the action buttons on it.
In either case, I want to dismiss the watch app and go back to whatever state it was in (back to the watch desktop, or springboard, or whatever it's called.) I don't want to present the UI for the watch app, since there isn't one, at least not yet. I don't know if my client is going to define a watch app UI or not.
As it is now, once the user clicks the dismiss button or an action button on the notification, the user is left with a stupid-looking placeholder watch app that simply has a button called "button" (which I added for testing.)
I'm afraid that you cannot change this. iOS decides which device the notification is shown on and you have no control over this.
If the iPhone is locked then iOS assumes that you are using your watch and will deliver the notification to it, however if your iPhone is unlocked it tends to deliver to notification to the iPhone.

Detect Home button long press event in background

How can I detect Home button long press like 4 second or more event in my app which is already running in background? Is it possible to so because app is already running in background and if user long press home button of the device for 4 second or more can i detect the event in my background running app and if possible than will Apple approve this for app store?
No that is not possible. As you should know, a long press on the home button brings up Siri. Your app would interfere with that. Also, I don't believe Apple allows access to the home button event like that.
Lastly; while your app is in the background, it goes into a suspend state after a short while and no events run. The only thing the app can do is receive push notifications - unless you have been given special access to audio / gps functions from Apple themselves.
Short answer : Not possible. not at least with public method and want your app to be on Appstore.
For the Research purpose, you might want to try use private method and do your R&D with it. it might be possible.

Resources