How to make an iphone app start automatically after an upgrade? - iphone

Our app has voip background mode.
Suppose the app is running in the background and an update of the app is presented in appstore. The user goes to appstore and clicks "update" or "update all".
If the user now does not wait for the update to finish, and then explicitly starts the app, the app is no longer running in the background, and the user cannot receive incoming voip calls. He just can receive incoming apple push messages.
Am I missing something?

Why not just push him a message? Cheezy, but it would get him to launch your app. The message can be something like "Thanks for upgrading, incoming calls now enabled."

Related

Notifications lost after app is idle for longer duration - one signal sdk in flutter

I have implemented one signal sdk to receive notifications. I receive notifications when the app is in background. As the app is removed from the background I receive notifications for sometime but after that I do not notifications. As the app is idle for long time (overnight) app is unable to receive notifications from one signal dashboard. As soon as I open the app and put in background/ remove it from background I start receiving the notifications. Can anyone help me here? I tried putting the app Data saving mode but that did not help. I have the app process running in the background tasks when I am not able to receive the notifications.

Flutter best way to store App Notifications?

Is there a way to store app notifications in a flutter app. Most of the time this app will be closed and the app notifications will not directly be hitting the app. I would like to store app notifications in a notifications received section. I know I can get the notifications if the app is opened, but for if the app is closed and it just shows as a status, I can't get them in the device unless the user clicks on the notification message. and it opens the app. What options do I have and is what I am wanting to do even possible?
First interpretation of your question: If I read your question correctly, you're saying its not possible to have text in your notifications when the app is not open. This is definitely possible, almost all your apps create notifications on the device with more than just 'status'.
Another interpretation of your question: In response to a firebase cloud messaging message, you might want to save data or do some other background task, instead of just creating a notification the user sees. This is not enabled by default. There's lots more instructions on enabling and using this in the README
By default background messaging is not enabled. To handle messages in the background:
The golden nugget of information is _firebaseMessaging.configure(onBackgroundMessage: yourBackgroundMessageHandler) which is not listed under the receiving messages section.
Let me know if I misread. What do you mean by status?
You can use background Fetch to make the app stay in the background. The package will awaken an app in the background about every 15 minutes.

How to bring iphone app from background to foreground without user interaction when push notification comes in objective c? [duplicate]

This question already has answers here:
Relaunch iOS app without user interface when application in background?
(4 answers)
Closed 10 years ago.
Please suggest me objective c code for bringing the app from background to foreground without any user interaction when push notification comes.
Unfortunately it is not possible as Notification come and your app started automatically even without user interaction.
As Push Notification comes it Handles by OS.
If a notification for an application arrives when that application is not running, the device alerts the user that the application has data waiting for it.
Then It means user have to interact with the Device.
From The Apple Doc.
When the operating system delivers push notification (iOS or OS X) and the target application is not running in the foreground, it presents the notification (alert, icon badge number, sound). If there is a notification alert and the user taps or clicks the action button (or moves the action slider), the application launches and calls a method to pass in the local-notification object or remote-notification payload. If the application is running in the foreground when the notification is delivered, the application delegate receives a local or push notification.
That's All.
I hope it clears to you.
I dont think its possible. Once push notification came, the os itself handles and show notification if it is enabled for your app. Then from the notification, if you are going to app, then didReceiveRemotenotification callback will be fired.
Thanks.
It's possible but it would require a jailbroken iPhone and hook the push notification receiver to launch your app when the notification is received.
If you aim for App Store you can't.

iPhone Push notifications via mobile safari

Is there a way to simulate push notifications by pushing data to mobile safari? Here are 2 scenarios.
I make a web app via phonegap and dont want to use APNS but rather make a web-socket connection and push data to the device myself. On the device end is there a "alert" function I can call to emulate a pop up when a user is not in the application?
Lets throw web app out the window. Is there a way I can do this in native mobile safari? Im not talking about a plain old JS alert window that would only come up if the user was in the app, but be able to do so with it backgrounded.
You cannot run background tasks with mobile safari so for #2 you can't do true push notifications or alerts. However you can send a user an SMS if you have the user's phone number. This can have a hyperlink to a part of your web site (which can contain some sort of payload). You can use a service such as Twilio to help you send SMS'es. However this costs money. APNS does not.
For scenario #1 I'm assuming you're talking about a native app using a phonegap solution. In this case when the app is backgrounded you cannot access any UI at all and wake up the app and show a UIAlert. In fact unless an app is registered for location updates or background music, the app is effectively not going to respond after a set period of time (it only can "finish" certain operations it had started before). So the websocket solution will only be effective if the user has the app opened.
You could register a local notification that runs at some predetermined time which will show an alert. But that is not being pushed from the server so its probably not what you want.
APNS is your best solution for scenario #1. Its not that hard to implement and its pretty inexpensive. Check out urban airship if you want to avoid building out your own server-side components for it.

iPhone Notifications is possible to

I read more post regarding iPhone notification, and I have a simple question....
Where a device receive a notification (so I can display a message contains the message notificatio ti advise the user).
I understand that message is managed by the application.
The question is:
...when my application receive the notification is it possible to start it?
Or in other world the application became run when receive the notification or it simple became active only to manage the message and at the end of notification management the app return to sleep?
The main application windows is opened on the device ?
Many thanks in advance
Lukenukem
Ciao
With push notifications you can prompt the user to take action, which if they agree (by tapping the "open application" button), will open the application automatically.
The caveat is that you can't do this without the users consent. They have to tap the open application button for your app to open. There's no way to open the app automatically without the user's action, nor is there any way to open, perform the required actions and quit the app automatically.
The apps dont "sleep" they are either running or not (till 4.0 OS that is), im assuming you are asking about push notification, what happens when a user receives a notification is that they can choose to close it, or go ahead and "view" the notification which can cause the app to open automatically...thats as far is it goes in the current system i blive...