Welcome to iPadForums.net Guest - Click Here to Register

Background work while app is "off"

This is a discussion on Background work while app is "off" within the iPad Development forums, part of the iPad App Store category; Is it possible to make app working at background when it's actually not activated (via tapping) by user. For example i have an app, that ...

Register with iPad Forums
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    iPad Fan!
    Member #
    37628
    Liked
    1 times
    Join Date
    Mar 2011
    Location
    London
    Posts
    6

    Question Background work while app is "off"

    Is it possible to make app working at background when it's actually not activated (via tapping) by user.

    For example i have an app, that runs cafe. And in this cafe chief is baking some food. When user disables app (running other apps, etc) i need baking to keep going and when dish is ready (for example remote server that serves app sends notification to user's iPad's Cafe-App) i want to send a notification to user saying "Your dish in Cafe-App is ready. Go and serve it before it get burn".

    Is it possible?
    Which approach i should use?
    Is there any topics/docs describing this problem?

    update.
    This looks like solution:
    developer(dot)apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
    Last edited by denn1s; 03-10-2011 at 04:18 AM.

  2. Ads


  3. #2
    iPF Legend
    Member #
    27654
    Liked
    116 times
    Join Date
    Jan 2011
    Location
    Scotland
    Posts
    15,249
    The problem is that iOS 4.2 and 4.3 are not really ‘multi-tasking’ in the way that most users understand. In your PC or Mac, what you are suggesting is eminently possible. But iOS is really a ‘task switcher’ and moves tasks/apps in and out of RAM (system memory) and stores their context (state) so that, when they’re reloaded, they start up in exactly the same state as when they were removed from RAM. Only a very limited background activity is allowed by iOS - for example file download/upload, playing music etc. There are, of course, timer/alarm ‘notifications’ that an app can have pushed to the iPad’s screen - say by apps such as ‘Calendar’ or other task/project management/alarm apps, as well as games - so you could have your ‘Café’ app time how long a customer’s dish is going to take to cook and then push a ‘notification’ to the iPad screen when it’s ready (‘Mr. John Doe’s Lasagne is ready’) but this would be a simple timer-style app that would run independently of any external ‘agent’. Yes, it would ‘run’ if the ‘Café’ app had been offloaded by iOS, because iOS itself is responsible for handling ‘notifications’. But whether an external agent - the server you mentioned - could *externally* trigger such an event when the ‘Café’, I don’t think is possible because iOS aggressively ‘sandboxes’ (isolates) apps from each other (advantage - no virus infection possible in the iPad) and rigorously controls the app<->OS interaction.

    I’m sure that other more-experienced Forum members will be able to add much more to this argument.

    Tim
    Scotland

  4. #3
    iPF Legend
    Member #
    27654
    Liked
    116 times
    Join Date
    Jan 2011
    Location
    Scotland
    Posts
    15,249
    I should have mentioned that, if you’re interested in developing your own apps or simply reading about this in more detail, a good start is the Apple iPad Developer’s Page.

    Start Developing iPad Apps - Apple Developer

    There are, of course too, any number of books/eBooks available in iBooks or Amazon.

    Good luck with your very interesting idea.

    Tim
    Scotland

  5. #4
    iPad Fan!
    Member #
    37628
    Liked
    1 times
    Join Date
    Mar 2011
    Location
    London
    Posts
    6
    hey Tim, thanx for answers

    Seems that iOS' Push Notifications system is the one that handles Pushes from outside the device (from some external server for example) and allows to implement my idea having dishes preparation be synced with external servers.

    and you're right about timing approach and using of internal notifications. this may fit when user disables network. in fact these two approaches can be combined =)

  6. #5
    iPF Legend
    Member #
    27654
    Liked
    116 times
    Join Date
    Jan 2011
    Location
    Scotland
    Posts
    15,249
    Sounds great - I'd love to know how you get on with this because I think there are a number of other Forum members who have been thinking of other apps that need this sort of external push.

    Oh - and don't forget to invite us to your cafe once you've implemented the idea!!

    Tim
    Scotland

  7. #6
    iPad Noob!
    Member #
    81727
    Join Date
    Jul 2011
    Posts
    1
    Hi all,

    thanks for the posts. I have in mind a similar idea and haven't found much around it. Glad to see your posts here.
    Similar to the cafe, what I would like to achieve is super simple:

    - I am thinking of an app able to run on the background and show pop up messages every x hours (i.e. 1 hour started says Hi!, after 1 more it says "How are you?" and so on... of course what I have in mind is a bit more interesting...

    The idea being:
    - This messages should be already preloaded in the app
    - Therefore no need for connectivity from internet

    Would appreciate a lot if, before I actually move forward with this using something such as the push notifications, anybody can give me some ideas on how to better achieve this. Would be also good if you know of a reference or library I can refer to in Xcode.

    THanks all


Home | Forum | Active Topics | What's New

Advertisements

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Any other games like "Words with Friends" or "Pirate Battle?"
    By Lend27 in forum iPad General Discussions
    Replies: 7
    Last Post: 03-21-2012, 06:30 PM
  2. Replies: 15
    Last Post: 06-20-2011, 02:24 PM
  3. Replies: 0
    Last Post: 02-23-2011, 08:29 AM
  4. Replies: 3
    Last Post: 01-14-2011, 02:59 AM
  5. "Notes" Doesn't work
    By Tapestrygabi in forum iPad Help
    Replies: 2
    Last Post: 01-12-2011, 05:27 PM

Search tags for this page

background task agent timer iphone
,
can work in the background with xcode
,
ios background activity
,
ios run timer background
,

set timer on xcode in background

,

xcode app running in background

,
xcode background work
,
xcode ios run in background
,
xcode keep timer running in background
,
xcode run app background
,

xcode run app in background

,
xcode run in background app
Click on a term to search for related topics.