iOS remote notification type - ios

Is there any apns push that can wake application up, do something in background and keep silence?
I found two solutions, but still not perfect:
Background notification. It can wakes app up in the background and gives it time to do something, but Apple doesn’t guarantee the delivery and it can't work after device is rebooted
UNNotificationServiceExtension. It can wakes app up and do something in the background, even if the device is rebooted. But, it can't be silent.
Our flow on iOS was:
Receive remote notification
Download data from server
Determine whether to notify from the content of the data
In iOS 12, our solution is PushKit, but it has some restrictions in iOS 13 now, so we have to make some changes.
Could anyone give me some advice, please? Thanks.

Related

voip notification not coming when the app is inactive for around 8 hours

I am building a group calling app and using ionic3 for the same. I am using voIP notification when the app is in background on inactive in ios. Everything works fine and as expected. The problem I am facing is when the app is in background or inactive for around 8 hours, I do not receive the voIP notification and hence app doesn't wakes up.
i am just a beginner in iOS development so It would be a great help if anyone could help me figure out this issue.
Once you receive payload, you have to schedule local notification with sound file.
You can also debug is your app crashing in background or killed state.
About 8 hours or any hours, ideally there is no issue when your integration is perfect.
Keep whatsapp in background for 2 days, then make incoming call to that whatsapp, it will notify you.
Refer more information about VOIP integration

After upgrade to iOS 11, iOS App not receiving APNS message when in Background

After upgrading iOS device to IOS 11 Beta version, my app has stopped receiving APNS message when it is in background. It does receive the message when it is in foreground. As per the device logs, APNS messages are being delivered to the device and are available in the notification center.
Has anyone experienced this issue?
This seems to be the global thread to jump onto. Not resolved, but has to do with iOS11 throttling / no-delivery of notifications in certain circumstances. Actually a lot of circumstances.
Very painful, as we depend on the delivery of silent pushes when app is active.
Silent pushes not delivered to the app on iOS 11

Push Notification App Running in Background When BLE is Connected

I worked on an Application which is Worked on BLE. i want push a notification ( App Running in Background When BLE is Connected) if any changes in Hardware. I Read Document
Even if your app supports one or both of the Core Bluetooth background execution modes, it can’t run forever. At some point, the system may need to terminate your app to free up memory for the current foreground app—causing any active or pending connections to be lost, for instance.
can i achieve my goal even my app in Background . If It is Possible Suggest me how to Achieve this . Thanks In Advance.
You may keep app in background by means of:
1.Audiosession(use this to play silent sound)
2.Location
3.VoIP
Any method can keep App in background and avoid App from being killed by system.
BLE Runs in the background, you need to specify that your app uses BLE Accessories or your app acts as a LE Accessory in the Background modes in app capabilities.
I've tried firing local notifications, while the application is in the background. BLE even works if the app is killed by the system, when the OS receives some communication from your peripheral or central, iOS wakes your app up and executes the desired function, before putting your app back to sleep.

VoIP app / restore connection on reboot

I developed a VoIP app and I read from the documentation that a VoIP app automatically restarts on phone reboot. However, DidFinishLaunchingWithOptions is not called on reboot so my connection cannot be restored.
The only way to reconnect is to start it manually it seems.
I can see the app is in memory, because it is quite quick to start when I click on it, but I thought the app should be able to restore its connection without user intervention.
Any thoughts? What am I missing? Is there another callback in AppDelegate that I missed?
The app is capable of receiving remote notifications in this state.
According to
Voip Pushkit notification will not re-launch the app if it was force-quitted and device was rebooted
this seems to work in most cases.
I have not found any official documents on this.
EDIT:
Here
https://developer.apple.com/library/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html#//apple_ref/doc/uid/TP40015243-CH30-SW1
is the official documentation on pushkit, which describes that the app is woken up, even if it not running or in background mode.

IOS 8 Silent push notification not working without Xcode

I'm trying to test out the silent push notification and I notice that my Iphone (IOS 8) can only receive silent notifications when my device is connected to Xcode. While it is unplugged, I can only receive one silent push in probably 5-10 tries. This only happen to IOS 8 because I have another phone which is running on IOS 7 and not even a single silent push is missed. Anyone face the same issue ?
More details:
If the phone is connected to power source, I'm able to get silent push notifications perfectly...
I have encountered similar issue. If my iPhone connects to the Xcode, it can be woken up successfully by silent push notification. However, if it disconnects to the Xcode, silent push notification can ONLY be received without being woken up to perform background fetch.
The root cause for my case is that I turned off the "Background App Refresh" on my device. ("Settings > General" > "Background App Refresh")
After I turn it on, my iPhone can work as expected again.
Good Luck!
Seems like you are using Debug certificate while interacting with APNs from the server side. And it only works while a device is in the debug mode.
For untethered push notification handling, you need to use Release certificate.
This article would give a better understanding on using certificates with APNs:
https://quickblox.com/developers/How_to_create_APNS_certificates
Sounds like a network issue to me. Are you sure that the PNs are actually delivered to your phone?
You could disable cellular radio (PNs are always delivered over cellular data even if on wifi) and use, e.g., tcpdump in promiscuous mode on your local wifi in order to see if there's anything coming in. Just look for packets from 17.x.x.x. Apple warned us they'd rate limit silent PNs, maybe that's the issue here (while that wouldn't really explain why it works while your phone is plugged in).
I know this questions is old but, according to Apple documentation, receiving and processing of silent push notifications depends on the conditions of the system, so I think that because you have a power supply, device will not throttle the delivery of notifications. Here is what Apple says:
Important
The system treats background notifications as low-priority: you can
use them to refresh your app’s content, but the system doesn’t
guarantee their delivery. In addition, the system may throttle the
delivery of background notifications if the total number becomes
excessive. The number of background notifications allowed by the
system depends on current conditions, but don’t try to send more than
two or three per hour.

Resources