Skip to content

Instantly share code, notes, and snippets.

@kirb
Last active February 26, 2020 16:20
Show Gist options
  • Save kirb/6149827 to your computer and use it in GitHub Desktop.
Save kirb/6149827 to your computer and use it in GitHub Desktop.
Doing a respring the right way

Respringing the "right way" allows SpringBoard to save usage data. Otherwise, your usage data is lost and the standby/usage times are reset to "–" until you fully charge again.

Tweaks that respring the right way

  • Activator
  • Auxo
  • Flipswitch
  • Springtomize

(There are probably a few more)

How to respring the right way

In tweaks:

[(SpringBoard *)[UIApplication sharedApplication] _relaunchSpringBoardNow];

From the command line:

Install cycript (Cydia will need to be in developer mode to find it). Create /usr/bin/spring and enter the following contents:

#!/usr/bin/cycript -p SpringBoard
[[SpringBoard sharedApplication] _relaunchSpringBoardNow];

chmod +x /usr/bin/spring to make it executable, and now you can run spring to respring. (You could also call it respring if /usr/bin/respring doesn't already exist.)

Can there be a "fix" for tweaks that don't respring the right way?

I'm working on it, not a high priority to get it done though.

@youngtvp
Copy link

[(SpringBoard *)[UIApplication sharedApplication] _relaunchSpringBoardNow];

@youngtvp
Copy link

!/usr/bin/cycript -p SpringBoard

[[SpringBoard sharedApplication] _relaunchSpringBoardNow];

@youngtvp
Copy link

chmod +x /usr/bin/spring

@mailinglists35
Copy link

is there a way to create an icon for this? does it need substrate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment