Worklight iOS push handler function when app is closed - ios

Worklight iOS Push notification not handling push received function when app is closed or not running. How to trigger push handler function when push receiving in worklight?
We are using Worklight V6.0.0.0.
We testes push notification sample project in 3 different scenarios.
When application is in foreground we are display notification as popup(or alert). Its working fine.
When application is in background(active) we are display badge in status bar. While clicking on badge(calls handler function) we are redirecting app to new page. This too working correctly.
But when application is closed we are receiving badge, while clicking on badge the application launching directly without invoking push handler function.

update May 26th:
I have tested with the supplied test project and the 3rd scenario mentioned in the question worked as well:
..
..
But when application is closed we are receiving badge, while
clicking on badge the application launching directly without invoking
push handler function.
In your test project, after closing the application you are no longer in the session with the server; this means you will need to re-login.
Login
Subscribe
Quit app
Send notification to subscribed username (used during Login in step 1)
Tap on notification
App launches > Login
Only now will the notification be displayed
Scenario 3 works OK for me.
Try again with the latest version of Worklight 6.0.0, which is Worklight 6.0.0.2, where many push-related fixes were done and I believe also a fix for the scenario you are describing.
Worklight 6.0.0.2 developer edition can be downloaded from here.
If you are an IBM customer or business partner, you can download the consumer or enterprise edition from IBM Fix Central.

Related

When App deletes (uninstall) getting a mail iOS

I made uninstall some apps from my iOS device. Then i got a mail from app developer for particular app.
How they get particular device make uninstall the app?
I followed below links but not getting proper solution.
Detect iOS application about to delete?
How to get the device details when user uninstalls the ios application
Basically, As you know there is no event is fired when App is deleted from the iPhone.
But you can do your tasks when the app installs so basically you can check application by sending the silent push notification.
Apple server will inform you when you try to push to an uninstalled instance the notification response at the sender side will come 410 means, user, no longer activate.
APNS REQUEST/RESPONSE
If you do not get the proper response from application side that means your application is uninstalled and you can send the mail.
Helpful links:
Call status change web-service when my App is deleted

Query OneSignal server from device to get info about push notifications received while app was closed

I'm using OneSignal Swift in a native iOS application. So far i'm able to handle all kinds of push notification cases (foreground/background) except one. When user has force closed the application from "task bar switcher".
I'm using 'content-available':'true' in all my notifications through OneSignal in order to wake up my app and start running code the exact moment the notification is received. So far so good everything is working as expected.
When the app is closed and push notification arrives, if user taps it, then handling with OneSignal works with OSHandleNotificationActionBlock callback.
The problem though is if user doesn't tap and just opens through application icon, then notification data are completely lost. Online reference dictates that the correct way of handling this (what most apps like Facebook do), is query tour APNS (OneSignal in my case) for unhandled notifications and re-fetch them on application start. So the question is how to do that from OneSignal iOS native SDK? Is it possible? There is ofc the REST Service -which might be the case- but users are clearly discouraged to call the API from inside client application. An app key is necessary which shouldn't be saved in device's keychain apparently for security reasons(??)...

Using Worklight for only client side iOS push notifications (registration and receive) having 3rd-party push notifications backend

In one of our projects we try to use Worklight with Phonegap push plugin (https://github.com/phonegap/phonegap-plugin-push). We are not using Worklight push notifications backend (and we cannot, because we have to use 3rd party push notifications backend). We only need from push notifications is to subscribe for push notifications (receive token from APNS and pass it with some user settings to 3rd party push notifications backend). We tried Worklight to use only for client side part (WL.Client.Push.registerEventSourceCallback, WL.Client.Push.Subscribe), but without any luck. The problem is, that there is no existing eventSource, which should be defined on Worklight push notifications backend (WL.Server.createEventSource). So we used Phonegap plugin for registration. And this worked (need merge Worklight and Phonegap plugin application delegates). The problem occurs when tapping on arrived push notification when application is not running (even in background). Application starts and crashes. If application is running in background application crash does not occur. Worklight version is 7.1, iOS version is 8.1.3.
From crash log I found that exception occurs in Push.m:
0x10018b2a4 -[Push dispatch:] (Push.m:227)
0x10018ad48 -[Push dispatchSelector:] (Push.m:204)
So my question is: Is it possible to use Worklight push notifications client side without Worklight push notifications backend? If yes, how? How to deal with event sources?
Primary question was asked but without detailed information: MFP application is crashing on tapping during PUSH notification when application is not running.
So my question is: Is it possible to use Worklight push notifications client side without Worklight push notifications backend? If yes, how? How to deal with event sources?
Short answer: No.
Long answer: The client- and server-side APIs are tightly coupled. You cannot use one without the other.

Push Notification if App is Closed

I am developing push enabled allpication. For that I have Integrated " Push Collector " sample from http://developer.blackberry.com/native/sampleapps/ .and hard coded app-id,PPG-URL etc.
now my question is if my push enabled appication is closed, can my App get the push messages ?
I want my app to get the push messages even if it is closed? If it is possible, how to get it done.
I am new to BlackBerry Platform Features and BB 10 development.
Please help,
Thanks!!!
This is a case where the new short running headless application API is applicable. One of the triggers that can result in the headless part of the application running is the receipt of push data. Start with the documentation here: https://developer.blackberry.com/native/documentation/cascades/device_platform/headless_apps/

Push notifications for iOS web app by using sockets?

i wonder if the following scenario is possible:
is it possible to use web-sockets (e.g. socket.io) to implement a kind of push notification? i think about the following method: when i save a web-app to the homescreen, open it and close it (so it's in the background), i send a notification over a server and the web-app in the background displays a alert-view?
thanks advance
Backgrounded app are not running. They will drop the connection after a few seconds.
The native notification system hands off the job of handling receiving notifications and restarting the app to the OS.
So you register to receive them with the OS and when one arrives to the device the OS will start your app and pass on the notification.
You'd need a PhoneGap native wrapper to achieve this for your web app.
Example

Resources