We just add VOiP capability to our app (messaging app), now we will use VOiP (PushKit Framework).
Can anyone tell me if we can use only that notifications (VOIP notifications)? Meaning even for text message for example (not for a call)? I talk about Apple Appstore Guides, they can reject the app or block the notifications if they found that we use that notification to notify the user about other things then a VOIP call?
The answer is yes, i used the VOiP notification for a no-voip notifications (like a text message) and Apple accept the app (and i can can confirm, after some tests, that whatsapp use the same thing as my app).
You need to implement VOIP functionality in order to not to be rejected. I've tried to use it for messages between users and it was not approved. So if you really don't have VOIP functionality, modify your server to your needs.
I have also implemented VOIP push notification in our app. But app is rejected by app store by saying
"We continue to find that your app declares support for VoIP in the UIBackgroundModes key in your Info.plist, but it does not include any Voice over IP services.
Please revise your app to either add VoIP features or remove the "voip" setting from the UIBackgroundModes key.
We recognize that VoIP can provide "keep alive" functionality that is useful for many app features. However, using VoIP in this manner is not the intended purpose of VoIP.".
Related
What my requirement is "I need to wake up my application from the background when a call comes in my iPhone".Is Any way to do so? Shall we get a unique number for the each user in
You'll need to use PushKit notifications and CallKit that can start the app even when the app is killed.
The CallKit is not really absolutely necessary, since it "just" allows you to provide standard calling interface. But it is a very nice feature to have - user is used to standard iOS interface for answering/declining calls, so I would definitely recommend to go with CallKit, instead of just standard notifications.
You can take a look at this tutorial, or just google together the PushKit, CallKit and Voip to get other relevant tutorials.
VoIP Push notifications is your solution.
I don't like the "link" answers myself, but here is how to do it:
Voice Over IP (VoIP) Best Practices (Apple documentation)
Roughly saying, VoIP pushes allow you to wake up your application and your code will be executed.
You may also be interested in CallKit, if you're working on soft-phone application.
We added silent notifications which require PushKit and enabling VoIP in the Info.plist
See Apple's PushKit Doc
Now my app is rejected by Apple:
Your app declares support for VoIP in the UIBackgroundModes key in your Info.plist, but does not include any Voice over IP services.
Please revise your app to either add VoIP features or remove the "voip" setting from the UIBackgroundModes key.
The app is NOT a VoIP therefore it doesn't require VoIP features.
Removing the VoIP from UIBackgroundModes causes the silent notifications to stop working.
Anyone know what I should do?
What VoIP feature can I add (even if I dont use it, just to pass the review)?
I asked Apple but they got back with an auto generated response with the same rejection reason.
You should likely be using iOS Service Extensions to decrypt the message.
https://developer.apple.com/reference/usernotifications/unnotificationserviceextension
You use this extension to modify the notification’s content or download content related to the extension. For example, you could use the extension to decrypt an encrypted data block or to download images associated with the notification.
You can also learn more about how this works at this WWDC talk.
https://developer.apple.com/videos/play/wwdc2016/707/
Implementing VoIP features to do this is complete overkill.
Update on the resolution -
We installed a third party VoIP solution and implemented VoIP calls in our app. Awkward to be forced to add a feature but in our case it was right for our app.
In iTunesConnect submission page, under "App Review Information" "Notes" I had to state that we added a new feature VoIP calls, with steps to test VoIP calls.
This caught the reviewers attention to the new VoIP call feature and the app passed.
When I added the new feature under "whats new in this version", the app continued to get rejected.
We have also faced same issue -
You can't use voip background mode unless you implement voip
features.
Just implement IM(chat) feature in your app then you will be capable to publish your
app at Appstore.
Good luck!
I want to sync my local DB with server when Push notification came, but I am not able to do it with Silent Notification because application:didReceiveRemoteNotification:fetchCompletionHandler not called when app killed by user. So, I did not know how to do it, then I read about push kit but don't know is it possible to use push kit without VoiP feature. Please tell me is it possible or not??
If not, suggest me any other idea , how will I run background task when app killed by user??
In my experience as well as others on SO - you get rejected for trying to leverage VOIP as a workaround. See below for actual response from apple dealing with a similar attempt.
2.16: Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
2.16 We found that your app uses a background mode but does not include functionality that requires that mode to run persistently. This behavior is not in compliance with the App Store Review Guidelines.
We noticed your app declares support for VoIP in the UIBackgroundModes key in your Info.plist but does not provide any Voice over IP services.
We recognize that VoIP can provide "keep alive" functionality that many app features would like to use. However, using VoIP in this manner is not the intended purpose of VoIP, which, as indicated in the iOS Application Programming Guide, is that: "A Voice over Internet Protocol (VoIP) application allows the user to make phone calls using an Internet connection instead of the device's cellular service."
Seems that the only way to restart the app when it was killed by user is to use PushKit.
It is possible to use PK framework in your app without Voip functionality, but I can't guarantee you, that your app will not be banned while posting to AppStore.
My app makes use of push notifications to alert the user when they receive a message. Due to the nature of my server and also due to encryption, the server does not know what the message is, only the iPhone is able to decrypt it. However, i would like the message to show in the notification. So i need processing time after a silent push to download and decrypt the message then use a local notification to tell the user
However, iOS doesn't allow processing time for killed apps, only for foreground ones or ones still in the app switcher. How can i workaround this issue?
One solution i have found is PushKit. This seems to relaunch apps even if they've been force quit. However, it only does this for VoIP apps, my app is not a VoIP app and I think App Review will reject it if I use PushKit
It is exactly as you described it and there is nothing to add. If the app is killed, you have no way of processing a silent push notification other than PushKit, but if you use PushKit, your app won't go through the review if it doesn't implement VoIP.
Your best option is to send push notification with a generic text (e.g. "You have a new message") instead of a silent push notification, that will serve as a fallback for the case that the app was killed. If the app was not killed, you can discard/remove the remote notification, download and decrypt the message and show a local notification with the actual message. If the app was killed, the remote notification with the generic text will be shown instead and the user will at least be notified that there is a new message.
Add this behavior to the FAQ of your app to encourage users to not kill the app. There is no reason to do this on iOS anyways, so if a user kills an app, he shouldn't expect that it works as desired.
Addition on misusing PushKit for this:
If you misuse a functionality/service for something it is not intended to be used for, your app will probably be rejected. So if you enable VoIP background mode, but your app doesn't provide any VoIP functionality, it is pretty obvious.
From the App Store Review Guidelines:
2.16 Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion,
local notifications, etc.
We are developing a chat application like WhatsApp. It's XMPP based application, the XMPP complaint servers are follows push model for sending the messages, presence..etc.
So when user is offline the messages goes into offline stack and pushes again once user comes into online.
We want know that when app is killed , Can we use voip capabilities to run in background? or we really need go push notification model?
Please help Me .
You cannot add VOIP for chat application but there are other background task execution options by which you can achieve this.
Modify your server side piece send notifications to the app at reasonable time intervals if user if not online and your app will get opportunity to execute in background when these notifications are delivered.
Yes Apple will reject your app if you use VOIP Capability in chat app(WhatsApp like application)
if are you trying to use in background with help of VOIP but you primary not implemented VOIP functionality then apple will reject your app i tried before this for my streaming music player.