Suddenly updating another application

Anyway, can I update the built-in Apple Mail based on the event in My application ?

So,

  • My application does not work on user phone.
  • A tick (without warning) push notification is expected.
  • It retrieves data and, based on certain conditions, an event is triggered.
  • Update (do not run) the Mail application so that it can receive its own push notifications.

Thus, everything happens in the background using the Mail application, which ultimately receives a push notification of new mail, because it will receive or retrieve or update manually.

I read the Inter-App Communication page, but it does not answer my question, so I wonder if even this is possible.

+5
source share
2 answers

Let me try to break what you ask:

  • My application receives a quiet push notification, receives some information and sends a request to the server (all in the background).

  • When the server receives this request, it sends an email to the device.

  • You want this email to be displayed instantly.

Apple does not give developers explicit control over changing user mail settings. As a developer, you probably won’t even know which email accounts are on the device (or if the user even has an account available). I would say that what you ask is not possible in the current Apple API structure.

Push notifications in the Mail application do not work like other applications. Any mail is instantly transferred to the device (the Push switch is on), the mail is selected at intervals, or the user manually updates the mail each time the application is opened. If the user set Fetch manually, he will not receive your email.

Fetch

+8
source

Well, there are many questions in what you ask, which may cause some problems:

My application does not work on user phone.

A tick (without warning) push notification is expected.

If the user has turned off the background for your application, your application will not even be notified silently. Nothing will happen.

It retrieves data and, based on certain conditions, an event is triggered.

Do not forget that you have only 30 seconds to complete any requests. If your request takes too long, iOS will kill the process.

Update (do not run) the Mail application so that it can receive its own push notifications themselves.

It’s simply impossible at all, perhaps with a hacked device: D Apple does not allow many features with its native applications. You can open the mail application, open a new letter for sending, but that’s almost all you can do.

0
source

All Articles