Why do apps have to be optimized for Multitasking?

Discussion in 'macOS' started by Bladery, Mar 8, 2017.

  1. Bladery macrumors 6502

    Apr 12, 2015
    hey guys,

    I was wondering why the hell the developers have to optimize their apps for multitasking while at windows it's possible by default without any action by a developer!

    It's the same for macOS.

    Best regards
  2. T'hain Esh Kelch macrumors 601

    T'hain Esh Kelch

    Aug 5, 2001
    Because your random Windows or macOS machine doesn't run on a 1960 mAh battery.
  3. Gav2k macrumors G3


    Jul 24, 2009
    It really depends on the type of app as to what function takes place when you switch apps. Some are ok to suspend say a game. But some may need data or push in the back ground. It's a lot more complicated than it sounds as the biggest issue is the battery.

    Look at Facebook. It had an issue where it didn't suspend with push properly so it was left running fully in the background. You had to go into the app switcher and close the app properly to resolve the issue. Had this been on a powered device it's not an issue but with a battery it's like streaming a movie over 3G and expecting all day battery life.
  4. Phil A. Moderator

    Phil A.

    Staff Member

    Apr 2, 2006
    Shropshire, UK
    It's a conscious design decision by Apple due to the limited resources on a Phone - they don't allow developers free rein to run their apps in the background because doing so could have an adverse affect on battery life.
  5. cswifx Suspended


    Dec 15, 2016
    It's to reduce issues caused by 'app holding CPU/GPU hostage in the background by being active'. This way Apple not only improves battery life and device performance, but also reduces support calls that are caused by rogue third party apps.
  6. electronicsguy macrumors 6502a


    Oct 12, 2015
    Pune, India
    write an app yourself, run it on a phone and see for yourself.
  7. zorinlynx macrumors 603


    May 31, 2007
    Florida, USA
    Because then you might as well use Android, where a rogue app can happily drain your battery in an hour while your phone sits on the table.

    There's a reason for some of Apple's design decisions, even though I don't agree with all of them. For example I wish you could make an exception for certain apps to always run in the background, like SSH clients, so sockets can stay open.
  8. KALLT, Mar 8, 2017
    Last edited: Mar 8, 2017

    KALLT macrumors 601

    Sep 23, 2008
    I am not sure what the OP even means. Every program needs to be optimised for ‘multitasking’ as well as sudden termination. Computer resources are always finite and the user may decide to quit a program whenever they want. The difference is that iOS is more aggressive (and predictable) than other systems, but it should not determine how a developer designs their application. Efficiency, idling, freeing up unused resources and continuation of the user’ activity should be done on every platform. iOS developers get much of this behaviour for free, because it is baked into the relevant platform APIs anyway.
  9. stevemiller macrumors 68000

    Oct 27, 2008
    While the intention might be there to avoid those situations, they somehow can still happen. I had to stop using waze because it wouldn't stop draining the battery, even when the app was closed from the multi-tasking switcher, and even when the phone was restarted. I had to fully delete the app to make it stop.
  10. C DM macrumors Sandy Bridge

    Oct 17, 2011
    Because mobile and desktop operating systems are different (like mobile and desktop hardware is different).
  11. Bladery thread starter macrumors 6502

    Apr 12, 2015
    Alright, thanks for the discussion.

    But on an iMac, which gets permanent power, they have to optimize it too
  12. C DM macrumors Sandy Bridge

    Oct 17, 2011
    What exactly do you mean by "they have to optimize it too"?
  13. NT1440 macrumors G5


    May 18, 2008
    They have to code an app to take advantage of things like split screen. That's not "optimizing", that's building a feature.
  14. Bladery thread starter macrumors 6502

    Apr 12, 2015
    I mean, that on desktop computers like iMac, the app SHOULDNT need optimization for multitasking because apparently they have unlimited power.
    But multitasking doesn't work for some apps neither on iMacs.
  15. NT1440 macrumors G5


    May 18, 2008
    I think you need to define terms here.

    What do you mean by "multitasking" on MacOS?

    I ask because you're using it in a way that leads me to believe you don't know what you are asking.
  16. Bladery thread starter macrumors 6502

    Apr 12, 2015
    Yeah I do but you're right, I used the wrong term. Doing multiple things at the same time ;-)

    I meant split view not multitasking.
  17. C DM macrumors Sandy Bridge

    Oct 17, 2011
    It sounds like the better question then is what do you mean by "multitasking" given that multiple apps can run just fine at the same time on macOS without anything special being added to the apps (which is basically what multitasking is).
    --- Post Merged, Mar 8, 2017 ---
    Ah, that's somewhat different as that's basically a different feature.
  18. NT1440 macrumors G5


    May 18, 2008
    There we go, yes an app has to specifically use the split view API in order to gain that functionality.
  19. cynics macrumors G4

    Jan 8, 2012
    So when you asked your original question were you actually referencing split view like on an iPad in iOS?

    If so its because apps need to be specifically design to run on certain aspect ratios and split screen is a relatively new thing. So everyone designed apps to run at specific screen ratios that fill the entire screen and designed the app entirely around that design. So unlike a window in OS X or Win the aspect ratio can't be changed very easily without designing (optimizing) the app for it.

    Easy way to think about it, ever type in a basic text editor and resize the window and all the text moves around, goes down a line, wraps, cuts words in half, etc? That is what could happen to an app that isn't designed to be resized.

Share This Page

18 March 8, 2017