Receive messages in the background state from a STOMP client socket in React Native - react-native

Previously, I had been using Xcode 13 to receive socket messages in the background state on iOS 15.5, and it was working perfectly. However, when I tried the same approach on iOS 16.2, the messages were not being received. I then updated to Xcode 14, but I'm still not getting any messages in either iOS version. Is there a way to receive messages in the background state from a socket in iOS 15.5 and 16.2?
I checked the socket is not disconnected in background state.

Related

how can i make socket connection run in the background process for android and ios in react native?

I have tried to run socket connection in the background process for android and ios, to display notifications using notifee package, what I'm trying to do is when the app is killed the service is going to still run in background process and display notification when the app is killed.

Error FPWSE1060W to send push notification in ibm mobilefirst 7.0

I am working on native-hybrid App using MobileFirst 7.0. The app use notifications push managed by MobileFirst. Notifications are sent using an MobileFirst adapter. Occasionally we are receiving the following error when sending notifications push:
com.ibm.pushworks.server.notification.gcm.TimeoutQueue W FPWSE1060W: GCM: 1 notifications deleted from the queue GCM-sender-AIzaSyAE because the waiting time is more than 50,000 sec.
Any idea why this error happens?
This error is a known problem that was recently fixed: PI67242 PUSH NOTIFICATION WONT SENT IN ANDROID DEVICES GCM WHEN MAXQUEUE LENGTH IS HIT
The fix for MobileFirst Platform Foundation 7.0 is available starting the build number dated 20160830-0817.
Please head over to IBM Fix Central and download the latest available iFix for MobileFirst Platform Foundation 7.0, which includes this fix and see if your issue is resolved.

MobileFirst heartbeat call in background with screen lock

Inside WLClient.h mention this comment.
#note The client sends a heartbeat signal to the server only when
the application is in the foreground. When the application is sent to
the background, the client stops sending heartbeat signals. The client
resumes sending heartbeat signals when the application is brought to
the foreground again.
I set my setHeartBeatInterval to 420. which is default. But when the app goes into background with lock screen. It still will call the heartbeat after 420 seconds. Then my app crash.
Is there anyway to disable the heartbeat call when the app goes into background?
Thanks so much =)
On MFP 7.1, we are not seeing any issue with heartbeat in both iOS 9.3.5 and iOS 10. In both iOS versions, when the app is in background(by pressing home or behind the lock screen), the heartbeats are paused and are not sent.
We see this behavior in the latest v7.1 iFix version and on iOS devices running iOS9.3.5 and iOS10.
However, on iOS10 simulator, we can see couple of heartbeat requests are made when the screen is locked or if the home button is pressed. But, even here, when the app is resumed, there is no crash. This seems to be a behavior with iOS 10 simulator only.

Mobile first server 7.1 - Issue with Android Devices when send multiple push notifications only last message is received in Notification center

When I send multiple notifications to Apple or Android devices through MFP, Apple devices will receive all the notifications on the other hand Android will only receive the last notification. We are using Unicast Notification to send messages to user devices using this REST API.
Android devices will also receive all the push notifications sent by the MFP server. The notification shade ( center) will however display only the last received. This does not mean the earlier ones are lost. They are all still available, just not visible in the notification shade.
You have not mentioned the complete build version of your MFP. To see all the notifications in the shade-
install the latest ifix from FixCentral, rebuild your application. Edit your wlclient.properties and add the following property-
showAllNotificationsInTray=true

iOS voip app sleeps & Reachability has changed, can I get notification?

I'm building a voip app for iOS and I'm handling working at background.
So far, i have iOS listening to the voip socket while app sleeps and wake it uppon incoming data.
My question is:
When the reachability has changed (Wifi -> 3G, Wifi -> Other Wifi, etc)
and the app is suspended, can I get some notification in order to reconnect my voip socket?
Thanks.
Answer was both Yes and No:
Register to Reachability network changes notifications.
If App goes to background suspended while its voip socket (see link) is connected, then uppon network changes app will wake up at background for 10 seconds.
If App goes to background suspended while its voip socket is NOT connected, then uppon network changes app will NOT wake up.
The solution for the scenario of network loss and going to background with no connection may be fixing the connection in the Keep-Alive block that you can schedule at UIApplication.
Note: during the mentioned 10 sec, you may ask for a background task in order to finish the reconnection job.
Links:
VoIP socket in iOS
VoIP socket wakeups - iOS 5 Watchdog
If you have a backgrounding socket you can subscribe to reachability notifications and they will fire while backgrounded so you can perform actions on the reachability changes. If you don't unsubscribe to the notifications when you hit the background you'll still get them if the object subscribing to the notifications is your app delegate.