Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

DelphiDemoFiremonkeyIOS

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.

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

1 Comment

Leave a Reply