i have been trying to find a way to track when our app is uninstalled from iOS device :
Sending Push notification, this sometimes gives the desired 410 ( app uninstalled ) most of the time returns just 200. I could not find any examples on how to use their Feedback service, which seems obsolite.
Background pinging works only when the app is in the background but not shutdown. It probably could work if the app uses location services, but that would require more permissions.
Is there any way stable way to track this at all ?
many thanks
You can share your exact case to get alternative solutions.
BTW, The nearest technique to achieve this is:
1- Send silent notification, Check the following:
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app
And Note the following:
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.
2- Once you have received the notification in the device, call a web-service to flag this device/ user.
In case you want this for collecting insights, you can use analytical frameworks like: Google Analytics to get all insights that you want (Active, Downloaded, ...). Check the following:
https://developers.google.com/analytics/devguides/collection/ios/v3
Related
I have created an app in android where I have used FCM Job Dispatcher. Now I am working on the iOS app and did not find anything like that From the FCM.
Then I tried to look into something like that called "Services in android" to perform the background task even when the app is close. But sadly I did not find anything similar to it in iOS.
So all I am left with the is Local notifications in iOS. but I do not know if it will help me if my use case is as follow:
App must run service only and only if the Internet is connected (wifi not mobile data), device is idle
The service must run if the upper given conditions are fulfilled regardless of either app is running or not.
So I am very much confused what should I select to perform such type of task. I am really confused that apps like WhatsApp and others How they actually getting calls and messages if they are not running even in background.
Please share your views that what should I use in these cases?
In context of performing tasks when your app is not in foreground:
1) App is in background - Simple background fetch will work
2) App has been terminated -
Note - If user forcefully quit the application nothing will work other than VOIP services but again VOIP services only available for the apps having audio/video calling feature
Case: 1 - User quit app forcefully
You can not do anything.
Case: 2 - System terminated the app for some reasons
Background fetch will work for the below conditions:
Location related services
Audio related services
Bluetooth/Peripheral devices data sync
Background downloads by silent-notifications (push message having key content-available key in the payload )
For more reference. read here
In iOS, app can only waken up in a few specific conditions, like: Push Notification, background fetch, location update... So depend on your needs, you should check the Background Modes and activate the one you need in project settings:
Project Editor -> Capabilities -> Background Modes
Hope this helps.
I am starting an application using Restroom and have a few questions about the iOS SDK.
I read through the documentation here http://documentation.telestax.com/restcomm-ios-sdk/doc/html/Classes/RCDevice.html#//api/name/listen
I have also checked out this:
https://github.com/RestComm/restcomm-ios-sdk
I see that the RCDevice class has a listen method and an unlisten method. If I want the device to always be available to receive calls should I have the listen method always going? If so, is this going to be terrible for battery life?
How do I make sure that the application is always running on the device so that it can always receive calls? I am pretty sure that iOS 10 will stop background connections unless the app is running in the foreground.
Is there a way to wake the application or open the application in the case of an incoming call? Can I use push notifications or something similar to wake/open the app?
I already replied to this question on the Restcomm Forum, but let me also answer here for better visibility by the community:
Yes, once you call unlisten() you will no longer be registered and hence receive no incoming events.
Ok, so it varies per platform. For Android since the SDK is wrapped in an Android Service even when the App leaves the foreground, the SDK continues running and you are able to receive events (we still need to check some updates on Android O though on that respect). For iOS we haven't implemented that yet so once you leave the foreground you are not able to receive any events :(. However, the plan is to move to Push Notifications functionality on both platforms soon.
Please check (2). Also, without Push Notifications, we were planning of supporting this with https://github.com/RestComm/restcomm-ios-sdk/issues/153, but also this isn't ready yet.
Best regards,
Antonis Tsakiridis
I'm trying to look for a way as to how I can notify a user of new updates based off of a .Net API that I created. Much like that notification you get on facebook, I just need to alert the user that something has been updated. So I'm thinking I need a function that runs in the background while my user uses the app combined with a NSTimer.
Based on my research (and on this question https://stackoverflow.com/a/14835300/639713) apparently you can only achieve such a thing for VOIP and location services. And that using push notification is the only way. Is it really the only option that I can use for such a need? Or are there any other ways?
Thank you for your time.
You have two options:
While your app is open, poll the server every so often to see if there are any updates to report.
This will work only as long as the user has your app open, and as you note, your app will only be allowed to stay open for a long time if it happens to be a VOIP or navigation app.
Use push notifications to push updates to the user’s device.
The disadvantage here is that you will need to write some server-side code to talk to Apple’s push notification servers (as described in this tutorial). This may or may not be a big deal in your particular situation, but it’s the only way to get data to the user when your app isn’t open.
I have a requirement to develop an app that is capable of receiving pushed information from a server - which as its not possible to intercept SMSs or apple push notifications would probably have to be implemented as a poll and see what's there or similar type of thing.
However of course such a thing isn't possible if the app isn't executing in the background.
The app couldn't be considered to be musical or voip related, however its possible that it could be considered to be gps related as the pushed information would be displayed to the user based on certain triggers, and one of those triggers could be location.
Would this app with a UIBackgroundMode of gps submitted to the app store stand a good chance of being accepted?
i have been trying to do the same thing and here is what i found
iPhone - Backgrounding to poll for events
(top answer: update 2)
shows a method that should be ok, meaning your app wont be rejected for using it. the guy who posted it said it should be ok and i have asked other members who said the same (i have not verified this myself).
here is my implementation of that post
local notifications?
You don't have to use a hack for your requirements.
iOS provides a facility whereas your application is suspended but your socket is still monitored. If there's any incoming traffic on the socket, the app is woken up and handed back the control of the socket.
Advanced App Tricks
Look under the heading, "Tips for Developing a VoIP App"
Within my iPhone application I periodically make calls to a webservice, providing the endpoint with a list of numeric IDs. The webservice then returns information relating to the IDs it receives.
This is all well and good. However, I would like to be able to provide functionality whereby the user will receive a local/push notification when these changes occur, regardless of whether the application is open or not.
I'm just looking for guidance on my options in this scenario. As I see it, there are two main approaches: calculate any data changes on my webserver and send a push notification to all devices, or query the webservice from the device itself.
The second option seems ideal, as not all devices will need each push notification, but I'm unsure as to whether this is possible with the current state of iOS' multitasking APIs. Any advice would be appreciated.
Bad news: it's not possible. Apps can only run in the background for a short period of time after the user has exited unless it fits into a small number of categories (GPS, VoIP, etc).
Web services, unfortunately, do not count. So this would have to be performed on the server side and with push notifications.