Allow Apps To Run In Background Under FireMonkey In Delphi 10 Berlin On IOS

Delphi 10 Berlin IOS Background App FireMonkeyDeveloper David Nottage proposes a nice solution to keeping your applications to run in the background on iOS. On iOS as well as on Android, it is the system that decides when to terminate an app for very specific reasons (i.e. memory starvation). For this particular reason, the onClose event of the app might not trigger, since the system decides to immediately kill the application. Thus, you should never place important code in this event, since it will not execute and even worse you could cause memory leaks if you try to free the memory in the onClose event and this event is not fired. Suspended applications receive no notification when they are terminated unlike the applications that run in the background and are not in the suspended state. In this case, the system calls applicationWillTerminate before the actual onClose event. In Delphi, in the case of UIApplication, two important methods have been left out:

The demo, wraps the two methods and provides easy and convenient integration. The implementation applies to Delphi 10 Berlin with FireMonkey. Here is a small sample of the demo implementation, just to give an idea and stir your interest to study it in more detail. This method is not related to UIBackgroundModes.

Head over and check out the demo for IOS Background Applications for Delphi Berlin with FireMonkey.

Mirror: Download the background IOS demo for Delphi 10 Berlin.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Allow Apps To Run In Background Under FireMonkey In Delphi 10 Berlin On IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

One Response to Allow Apps To Run In Background Under FireMonkey In Delphi 10 Berlin On IOS

  1. Lena says:

    Please for C++ Builder 10.1!

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Medical Digital Imaging Component For FireMonkey In Delphi 10 Berlin On Android And IOS

Developer MedicalEffect  has a DICOM component now available for FireMonkey in Delphi 10 Berlin which gives you the possibility to build powerful...