Background task execution external for iOS

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Background task execution external for iOS

Post by monte » Wed Oct 10, 2012 4:23 am

Hi LiveCoders

This morning Guglielmo emailed me asking if the background task execution external that I had discussed on the developer list a while back was available. RunRev don't officially support apps that don't quit on suspend at the moment so I hadn't released it. After Guglielmo's request I decided to release with a note that it should be considered experimental. It's now available for purchase and download from mergExt for $29 (or as part of the suite). There's still a few weeks left to lock in the current pricing and I plan to release at least one new external every week in that time.

Here's a youtube video of the external in action including how to delete the exits on suspend key from the plist which may be useful to some even without the external: http://youtu.be/8qrnVGJ7lFA

Cheers

Monte

--
M E R Goulding
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Background task execution external for iOS

Post by jacque » Wed Oct 10, 2012 7:20 pm

Has anyone actually figured out why suspend isn't supported? If I knew that, I could make intelligent decisions about whether to risk trying it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Background task execution external for iOS

Post by monte » Wed Oct 10, 2012 9:57 pm

The main issue is if you have some blocking code running when the app is suspended you won't be able to handle suspend/ resume right. If there's some important data you might want to save that state before starting your blocking code. What I mean by blocking code is something that won't end within a few minutes. Like an answer dialog.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7258
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Background task execution external for iOS

Post by jacque » Thu Oct 11, 2012 5:37 pm

Thanks Monte, that's good to know. I've thought of altering the plist but wasn't sure what would happen.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Background task execution external for iOS

Post by Mag » Fri Jul 12, 2013 2:14 am

Thanks Monte for this great topic. Because in my case I can't use the mergBackground, I tried to remove the key from .plist template. All seems to work fine. someone else has already tried it and have any advice or experience to share? I would not cause problems for users of the app ...

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Background task execution external for iOS

Post by monte » Fri Jul 12, 2013 3:56 am

Guglielmo has an app in the appstore with it removed so he might like to comment here.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Background task execution external for iOS

Post by Mag » Fri Jul 12, 2013 9:17 am

It would be interesting to know something more. Hopefully he see the discussion. Meanwhile I am trying to figure out which messages are sent when the app go in background and when come back in foregrand, if any. This would let me handle situations where there was running code.

OK, these don't work on iOS:

Code: Select all

on suspend
  set the label of button "suspended" of card "main" to the time
end suspend

on resume
  set the label of button "resumed" of card "main" to the time
end resume

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Background task execution external for iOS

Post by monte » Fri Jul 12, 2013 10:21 pm

Hi Mag

Take a look at mergNotify... the example scripts were implemented just for this purpose ;-)

Cheers

Monte
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Background task execution external for iOS

Post by Mag » Mon Jul 15, 2013 6:09 pm

monte wrote:Hi Mag

Take a look at mergNotify... the example scripts were implemented just for this purpose ;-)

Cheers

Monte
Great external indeed. Can I use it to know if the app has gone in bg?

PS
Coff... coff... any news about new minor of mergAV? :)

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Background task execution external for iOS

Post by monte » Mon Jul 15, 2013 10:10 pm

Use UIApplicationWillResignActive

Sorry, last week slipped away from me. I'll try and get mergAV up today.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Background task execution external for iOS

Post by Mag » Mon Jul 15, 2013 11:04 pm

Implemented in my project. It work like a charm, thank you.

PS
Like so much the news on AV, thanks! :)

Post Reply

Return to “Announcements”