How long does an app run in the background?

Discussion in 'iOS Programming' started by Danneman101, Nov 6, 2011.

  1. Danneman101 macrumors 6502

    Aug 14, 2008
    I've got a popup asking for users to rate the app after it's been opened a certain nr of times.

    However, since apps run in the background on iOS when exited rather than being shut down, it's hard to gauge how many times is appropriate before the nagging begins. Don't want it to be too soon, but not too late either.

    So my question is: how long does an app stay in the background before it's forced to close?

    I'm thinking of using the "Application does not run in the background"-attribute in the plist to force it closed each time a user exits it, since the app is a very fast starter and quickly resumes to where the user left off.
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Why don't you save the time stamp when the app runs the first time and then start nagging a week or a month after that?
  3. ArtOfWarfare macrumors G3


    Nov 26, 2007
    Register to receive notifications for UIApplicationWillEnterForegroundNotification.

    Every time that is called, increment your use counter by one.

    Also, I don't think that that notification is made when your application starts and wasn't already in the background (although maybe I'm wrong), so you'll want to also increment your use counter whenever your root view is loaded from the XIB.
  4. firewood macrumors 604

    Jul 29, 2003
    Silicon Valley
    There is no fixed or predictable amount of time that an app may run in the background (unless the app has the plist key for not running in the background at all).
  5. Danneman101 thread starter macrumors 6502

    Aug 14, 2008
    I was considering the timestamp-solution by PhoneyDeveloper, but realized that it wouldn't take into account the fact that various users use my app at very varying frequencies (some finish it off in a couple of days, and others in a couple of months).

    ArtOfWarfare: Your solution seems to be the most adequate for my purposes. Also, it requires much less editing of the code which is usually a benefit ;)

    Thanks guys for your suggestions and insight :)
  6. North Bronson macrumors 6502

    Oct 31, 2007
    San José
    This is a bad move.
  7. jiminaus macrumors 65816


    Dec 16, 2010
    I deliberately give bad ratings for apps that pester me to rate them.
  8. ArtOfWarfare macrumors G3


    Nov 26, 2007
    Eh, I'd say about half the reviews I've written I wrote because a pop up asked me to.

    And I actually can't say I've ever not written one when I've been asked to.
  9. Phil A. Moderator

    Phil A.

    Staff Member

    Apr 2, 2006
    Shropshire, UK
    Don't do it! It's an incredibly annoying thing for an app to do and I know a lot of people (including myself) who will routinely give apps that do this a very low rating
  10. Danneman101, Nov 6, 2011
    Last edited: Nov 6, 2011

    Danneman101 thread starter macrumors 6502

    Aug 14, 2008
    I can understand that people with a fourteen year old type of mentality would respond in such a manner not being able to understand the link between rating and the possibility of an app-maker to stay in business and thus continuing to provide the apps they download most often for free, but thankfully my apps are targeting grown-ups ;)

    Seriously though, I do get your point - and I agree, it's annoying...although I must say that much like ArtOfWarfare I personally almost never rate an app without being asked first. Since we're all developers here, however, what would you consider being a good way to entice a user to post a review? And please refrain from truisms like "just make a great app!" - it goes without saying :rolleyes:

    Btw, is there a way to integrate the rating within the app without having to redirect him to the app store where he has to scroll down and find the Ratings-button and then the Write-a-Review-button before being able to rate/review. I mean, let's face it, that's two more steps than the average user has stamina for.
  11. MythicFrost macrumors 68040


    Mar 11, 2009
    Infinity Blade does this but has "Rate now, remind me later, don't show again", options. I'd do that. Only show them it once and stop if they hit don't show again, and do it every once and a while if they hit remind me later.
  12. Phil A. Moderator

    Phil A.

    Staff Member

    Apr 2, 2006
    Shropshire, UK
    It's a hell of a long time since I was a 14 year old so I'll ignore your slightly insulting comment and answer your serious question instead ;)

    I agree that getting users to post reviews isn't the easiest thing in the world to do, but I don't think annoying them is a good way to get good reviews.
    I think the mistake here is making the app store the primary marketing tool for the application when in reality it's a lousy way to promote your apps as many developers (myself included) have found.

    In order to stand out from the crowd you really need people to be coming to the app store for the app rather than seeing the app when browsing. Without a huge marketing budget it's not an easy thing to do, but some creative use of other channels (such as facebook, twitter, youtube) and review sites may help
  13. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    A simpler alternative is to put your "incremented" in your app delegate's applicationWillEnterForeground: method.

    Appirater (an unfortunately-named library which does all the heaving-lifting of a ratings-prompt for you) will take the user to the review page, so they only need to tap Write-a-Review, thereby eliminating one step. You might consider looking at how their code does it, or even integrating that library into your own app. It has a number of decent config settings for controlling how it works.
  14. Danneman101 thread starter macrumors 6502

    Aug 14, 2008
    I'm glad to hear that the written word (with the help of some smileys) was able to convey the jesting rather than insulting nature of my post :)

    The problem as I've experienced it is that even with a steady stream of potential users being redirected to you app from external sites, when faced with an app that has very few or even no ratings they tend to reject it. So it's kinda a catch 22 situation, really :p


    Appirater seems like a great solution - just eliminating one step goes a long way I think in getting users to actually finish the review process.

    And thanks also for suggesting the "applicationWillEnterForeground"-method :)
  15. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    I was searching for this thread to see the opinions on encouraging users to write reviews and noticed your question. I know this was answered on some other thread but couldn't find that, so here is what I do. I put my apps AppleID in the place I've hi-lighted red. This takes you out of your app and into the App Store app to a page where the 'Write Review' button is on the top of page.

    - (IBAction) appReviewPage:(id)sender;
        NSString * urlString = [NSString stringWithString: @"itms-apps://[COLOR="Red"]AppID[/COLOR]"];
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString: urlString]];

    I too am thinking of setting up a nagging for reviews. I could count the exact number of times a user actually creates a time lapse. Those who use the app very little might not ever get nagged, while those enthusiasts who would clearly have more experience with the app would be the ones I'd be nagging.
  16. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I've found that simply having a button in a menu somewhere to review the app doesn't work too bad. I put it right along side other buttons like,

    - Tell a Friend (it starts an email including a link to my app in the AppStore.)
    - Contact the Developer (it starts an email addressed to me with the subject "Regarding <App Name>"
    - Visit Developer's Website
    - Leave a Review
    - Like on Facebook

    For my Mac OS X app, I put these buttons in the About window.

    For my iOS apps, I put them in an options menu of sorts.

Share This Page