Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Firemonkey iOS - Background Mode - FETCH


This question is answered.


Permlink Replies: 4 - Last Post: Mar 18, 2018 2:40 PM Last Post By: Paschalis Tsepe...
Marc C

Posts: 8
Registered: 5/6/07
Firemonkey iOS - Background Mode - FETCH  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 13, 2016 6:41 PM
Hello,

I am trying to implement an iOS Firemonkey App using background Mode FETCH. The need is to periodically get new JSON data from server, even when the app is not foreground.

I have configured the proper key under project options (FMLocalNotificationPermission) to FETCH. However, the app only runs for 180 seconds on the background and then gets killed by iOS.

If the background mode LOCATION is used, everything works great, the app is never killed.

Did anyone successfully implement a firemonkey iOS app using the FETCH background mode? Any tips?

Thanks!
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Firemonkey iOS - Background Mode - FETCH  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 15, 2016 9:07 PM   in response to: Marc C in response to: Marc C
I am trying to implement an iOS Firemonkey App using background Mode FETCH. The need is to periodically get new JSON data from server, even when the app is not foreground.

I have configured the proper key under project options (FMLocalNotificationPermission) to FETCH. However, the app only runs for 180 seconds on the background and then gets killed by iOS.

If the background mode LOCATION is used, everything works great, the app is never killed.

Did anyone successfully implement a firemonkey iOS app using the FETCH background mode? Any tips?

There's a solution, here:

http://stackoverflow.com/questions/23130639/calling-objective-c-code-block-from-delphi

However, I'm planning on working out a similar approach to:

http://delphiworlds.com/2016/05/allowing-ios-app-run-background/

My Mac has been out of action for a few days, so my plans were "on hold"; I should get to it in the next day or so.

--
Dave Nottage [TeamB]
Delphi Worlds blog: http://www.delphiworlds.com/blog
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Firemonkey iOS - Background Mode - FETCH
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 18, 2016 12:23 AM   in response to: Marc C in response to: Marc C
MARC C wrote:

Did anyone successfully implement a firemonkey iOS app using the FETCH background mode? Any tips?

http://delphiworlds.com/2016/06/performing-background-fetches-ios/

--
Dave Nottage [TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog
Marc C

Posts: 8
Registered: 5/6/07
Re: Firemonkey iOS - Background Mode - FETCH  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 19, 2016 9:46 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
MARC C wrote:

Did anyone successfully implement a firemonkey iOS app using the FETCH background mode? Any tips?

http://delphiworlds.com/2016/06/performing-background-fetches-ios/

--
Dave Nottage [TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog

Thank you, Dave! Perfect and very elegant solution. You rock!
Paschalis Tsepe...

Posts: 2
Registered: 6/19/14
Re: Firemonkey iOS - Background Mode - FETCH  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 18, 2018 2:40 PM   in response to: Marc C in response to: Marc C
Marc C wrote:
Dave Nottage wrote:
MARC C wrote:

Did anyone successfully implement a firemonkey iOS app using the FETCH background mode? Any tips?

http://delphiworlds.com/2016/06/performing-background-fetches-ios/

--
Dave Nottage [TeamB]
Hints, tips and tricks at: http://www.delphiworlds.com/blog

Thank you, Dave! Perfect and very elegant solution. You rock!

Hi,
I have tried Dave's code from Delphi World with Tokyo on iOS11 and it doesn't work.
Is your implemetation still working ?

Thanks
Paschalis
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02