Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh another app silently

Tags:

ios

Is there anyway I could refresh the built-in Apple Mail based on an event in My App?

So,:

  1. My App is not running on the user's phone.
  2. It waits to receives a silent (without an alert) push notification.
  3. It pulls data and based on certain conditions an event is triggered.
  4. Refresh (not launch) the Mail app so it can receive its own push notifications itself.

So essentially everything happens in the background with Mail app eventually receiving the push notification of a new mail as it would receive or fetch or manual refresh.

I read the Inter-App Communication page but it doesn't answer my question so I'm wondering if its even possible.

like image 952
eozzy Avatar asked Sep 20 '16 13:09

eozzy


People also ask

What is silent update in Android?

Modifying a program's executable code without the knowledge of the user. At startup, an application may query the Internet for an update and apply the change without prompting the user. For example, Google's Chrome browser performs routine silent updating to ensure that the latest vulnerabilities are fixed.

How do I ignore an app update?

Open the Play Store and tap your profile picture on the top right. Go to Settings, select Network preferences, and go to Auto-update apps. Select Don't auto-update apps and tap DONE. You could also select the Over Wi-Fi only option if you'd prefer automatic updates on Wi-Fi.


1 Answers

Let me try to break down what you are asking:

  1. My App receives a silent push notification, gets some information, and sends a request to a server (all in the background).

  2. When the server receives that request, it sends out an email to the device.

  3. You want that email to appear instantly.

Apple does not give developers explicit control to change a user's mail settings. As a developer you probably won't even know what mail accounts are on the device (or if the user even has the right account available). I would say that what you are asking is impossible with the current structure of Apple's APIs.

Push notifications in the Mail app do not work like other apps. Either mail is pushed to the device instantly (the Push switch is enabled), mail is fetched on an interval, or the user manually refreshes the mail every time they open the app. If the user has Fetch set to manual, they will not get your email.

Fetch

like image 95
JAL Avatar answered Oct 02 '22 13:10

JAL