XMPP Modules kill app in background - ios

I am implementing a chat app using XMPP framework. Now the problem is that the app is getting killed when the app goes to sleep mode and the phone is locked after 5-10 mins. Now when I comment the XMPP code then the app is running. Could anybody help me explain why is it happening. How could I resolve the issue or what could be the cause of the same.

Related

Want to kill iOS App while in suspended state

I want to kill my application if it is in the suspended mode for more than 30mins so that when it relaunches it fetches new data. I have looked all over but wasn't able to find a solution to it. If anyone can recommend something it will be a huge help.
exit(0)
This above command is not recommended and apple will reject the application. Then there is the functionality of BGAppRefreshTask for iOS13 and above or minimumBackgroundFetchInterval for iOS less than iOS13, but still how to actually kill the application programmatically? Any help would be such a plus. Thanks

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

TokBox iOS - App Background process singal not working

We are facing some strange issue in the iOS app , we are handling the signal when app in background mode.
It's perfectly working in xcode simulator and the same thing it's not working in real iOS devices. The signals not receiving in app background mode.
Do we need to enable any settings in iOS devices to handle this?
And, It's perfectly working in android devices.
Please help on this.
(Also Project->Capabilities-> Background Modes -> Audio,AirPlay,PIP is enabled for this to work in background.)
Apps sent to the background are generally expected to get suspended unless there is a reason for the process to stay running. In the case of using the OpenTok SDK, usually this means the app will be suspended unless there is a Publisher and/or Subscriber running -- background permission is tied to the AVAudioSession.
If you are trying to just keep a session connected without any subscribers/publishers while the app is in the background, this is not a recommended implementation. Keeping a websocket active for an OpenTok session requires trickling data every few seconds, creating an unnecessary burden on energy and data costs. For this reason, it is recommended to do your offline signaling via APNS rather than through an OpenTok session.
I trust you may have already seen this, but just for completeness, a more in-depth writeup on the topic is available here: https://tokbox.com/developer/sdks/ios/background-state.html
Disclosure: I work for TokBox.

iOS background service using BLE after reboot

I'm new to mobile development, before eventually deciding where to develop (android/ iOS) a specific application I have a question (I'd prefer using an iPhone):
So the background is that I have a BLE device frequently sending data to the phone and let the phone app sync the data to the cloud. Now, it is really important that if for some reason the phone has to restart, it will automatically proceed receiving the BLE data.
Is it possible at all in iOS to start a background process (handling BLE packets) after reboot automatically. Thus e.g. when the respective BLE device pairs to the phone after a reboot, that the background process starts automatically, without the user having to start the app manually?
Doing some research I came up with mixed results regarding this scenario and would be grateful if someone with iOS experience could clarify.
(BTW: It does not have to be an Apple App Store Application)
A Few days ago I was working on BLE devices Beacons we supposed to make mobile application and start monitoring these beacons and send date monitoring to API.
This works fine in background, even the user was not running the application in foreground or reboot his iPhone.
All we should do is put the monitoring code at the appDelegate of the application to work in the background.

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.

Resources