• Your favorite

    Apple

    ,

    iPhone

    ,

    iPad

    ,

    iOS

    ,
    Jailbreak
    , and
    Cydia
    site.
  • 'SmartClose' Puts All Backgrounded Apps Into a 'Deep Sleep' State


    Normally when you close applications in iOS, the operating system permits those applications to run in the background for up to 10 minutes before they're suspended in a "deep sleep" mode.

    A new free jailbreak tweak called SmartClose by iOS developer Ryan Petrich will make it so that applications in iOS are automatically sent into that "deep sleep" mode when you close them, rather than being allowed to stay open in the background.

    Petrich explains how this works on Reddit:

    Quote Originally Posted by Ryan Petrich
    As of iOS 4, all apps are allowed to run in the background for a period of 10 minutes, before being put into a deep frozen state. There are additional scenarios where an app can run for longer or be exempted from the frozen state, including when playing or recording audio, when providing a VoIP connection, or when GPS navigation is being used. Newer iOS versions have added additional scenarios where an app can be running in the background.

    Since then a number of "app quitting" tweaks have been released, all of which stop this background activity by killing apps and unloading them from memory entirely. This is wasteful. Killing apps forces a complete reload the next time the app is launched, which can be expensive in terms of how much time and battery power it takes to do so. In that scenario, binaries have to be loaded from disk, checked for code signing, UIKit startup has to happen with handshakes between the iOS and the app to create windows and views, and that's just the bare minimum necessary to get a blank window (doesn't include loading any data or functional UI of any kind). Sometimes this can result in better performance if one of those background apps is using CPU, network or too much memory at the expense of the active app.

    SmartClose does it differently. It takes all apps that are running in the background and puts them immediately into the deep freeze state. This is a state where the app cannot perform any network, location updates, or use the CPU or GPU at all, but is resident in memory ready for very quick relaunches that use no additional battery. In the event iOS runs low on memory, it will pick one of the frozen apps to kill. Since frozen apps don't need to be asked politely to unload, iOS can just kill them and reclaim their memory very quickly.
    As explained, there are also both performance and battery life gains to putting applications in "deep sleep" mode, rather than completely closing and re-launching applications, or even allowing them to keep performing actions in the background. With that, this tweak can come in handy for a variety of users.

    Once installed, the tweak is used by way of an Activator action:



    The tweak is made available for free in Ryan Petrich's beta repository. If you want to add SmartClose to your jailbroken iOS device, add Ryan Petrich’s beta repository by following the steps below:


    • tap on the Manage tab
    • tap on the Sources button
    • tap on the Edit button
    • tap on the Add button
    • enter the following URL and then tap Add Source:


    PHP Code:
    http://rpetri.ch/repo/ 
    Name: SmartClose
    Price:FREE
    Version: 0.1
    Tested on: iPhone 5 running iOS 7.0.6
    Repo: Ryan Petrich's Beta Repo
    Developer: Ryan Petrich
    Editor's Rating:  5/5
    This article was originally published in forum thread: 'SmartClose' Puts All Backgrounded Apps Into a 'Deep Sleep' State started by Anthony Bouchard View original post
    Comments 14 Comments
    1. tankz504's Avatar
      tankz504 -
      I found this post by /u/Calvinex over on reddit and it works wonderfully!

      "This is a quick tip for changing KillAllApps into SmartClose.

      First of all you need to open iFile and browse to /Library/Application Support/CCToggles/QuickLaunches.

      Add a new folder named "com.rpetrich.smartclose" and copy/paste in it the [email protected] (or Icon.png for non-retina) that you find in the folder "KillAllApps.bundle".

      Now you can close iFile and open your CCToggles settings. Remove KillAllApps shortcut and add a new activator action selecting SmartClose. You're done."
    1. eggsbrah's Avatar
      eggsbrah -
      Awesome tweak. Anyone know how to replace the KillAllApps action in QLPanels with SmartClose?
    1. ShioN915's Avatar
      ShioN915 -
      Quote Originally Posted by tankz504 View Post
      I found this post by /u/Calvinex over on reddit and it works wonderfully!

      "This is a quick tip for changing KillAllApps into SmartClose.

      First of all you need to open iFile and browse to /Library/Application Support/CCToggles/QuickLaunches.

      Add a new folder named "com.rpetrich.smartclose" and copy/paste in it the [email protected] (or Icon.png for non-retina) that you find in the folder "KillAllApps.bundle".

      Now you can close iFile and open your CCToggles settings. Remove KillAllApps shortcut and add a new activator action selecting SmartClose. You're done."
      works great! thanks for the tip!
    1. hypnopotamus's Avatar
      hypnopotamus -
      I followed your instructions and now I have a blank icon on my CCToggles QuickLaunches that does the same thing as KillAllApps, when I press it it just clears all apps in the app switcher just like KillAllApps does. Is that what it's supposed to do?
    1. V3RT's Avatar
      V3RT -
      So....a few things.
      1. I never have to close an app ever again with SmartClose installed?
      2. Can SmartClose just automatically make all background apps freeze instead of tying to an activation method?
      3. Will this freeze backgrouns apps that I DO want to run like Dropbox Camera Upload, Pandora, Skype, etc?
    1. kwan's Avatar
      kwan -
      I'm on an iPhone 5s and I'm not seeing it on activator. Is there a way to find out if it's working in the background? Perhaps it's not even compatible with 5s?
    1. Anthony Bouchard's Avatar
      Anthony Bouchard -
      Quote Originally Posted by kwan View Post
      I'm on an iPhone 5s and I'm not seeing it on activator. Is there a way to find out if it's working in the background? Perhaps it's not even compatible with 5s?
      It won't be at the top of the Activator list. You have to scroll down quite a bit.
    1. Nuff Said's Avatar
      Nuff Said -
      Is killing an app completely really that big of a deal? Will starting up an app really cause a significant drain in my battery in the couple seconds it takes to relaunch? Killing an app seems perfectly fine the way it is already.
    1. tankz504's Avatar
      tankz504 -
      Quote Originally Posted by hypnopotamus View Post
      I followed your instructions and now I have a blank icon on my CCToggles QuickLaunches that does the same thing as KillAllApps, when I press it it just clears all apps in the app switcher just like KillAllApps does. Is that what it's supposed to do?
      Double check the capitalization and spelling of the file you made. It has to be all lower case exactly how it shows up there. When I did mine ifile made the letter c capital and it would not show the icon, just a blank square.

      I corrected the case and deleted the toggle in cctoggles. After I deleted it I made a new one and the icon was right.

      As for the functionality, that's what it does.

      Quote Originally Posted by V3RT View Post
      So....a few things.
      1. I never have to close an app ever again with SmartClose installed?
      2. Can SmartClose just automatically make all background apps freeze instead of tying to an activation method?
      3. Will this freeze backgrouns apps that I DO want to run like Dropbox Camera Upload, Pandora, Skype, etc?
      You can blacklist the apps you want to keep running in activator.

      Quote Originally Posted by kwan View Post
      I'm on an iPhone 5s and I'm not seeing it on activator. Is there a way to find out if it's working in the background? Perhaps it's not even compatible with 5s?
      It works in a 5s and is located in the system actions section.
    1. edwilk55's Avatar
      edwilk55 -
      Is KillAllApps part of the CCToggles? I use KillBackground7, but wold like to take advantage of this tweak to override KillAllApps.

      Thx peeps.
    1. tankz504's Avatar
      tankz504 -
      ^^yup
    1. hypnopotamus's Avatar
      hypnopotamus -
      Thanx, did that, works great
      Hope this fixes my battery time a bit, it's been horrible ever since I installed ios 7 on my iphone 4s
    1. t1me2die's Avatar
      t1me2die -
      I'm looking for an tweak which prevent exactly one App for going in the "deep sleep" mode!
      Anybody know a tweak for this scenario?
    1. hypnopotamus's Avatar
      hypnopotamus -
      I have experienced severe battery drain after I started using this tweak. Not sure what is the problem. Does anyone else have the same issue?