Skip to content

Instantly share code, notes, and snippets.

@Mabdelwanis
Forked from hetelek/SimpleRespring.xm
Created November 30, 2023 22:12
Show Gist options
  • Save Mabdelwanis/9401456497edf915e3612dcbb3931382 to your computer and use it in GitHub Desktop.
Save Mabdelwanis/9401456497edf915e3612dcbb3931382 to your computer and use it in GitHub Desktop.
A tweak (for iOS 7) that allows you to respring your device by swiping the homescreen card up in the app switcher.
#import <substrate.h>
%hook SBAppSliderController
- (BOOL)sliderScroller:(id)scrollingViewController isIndexRemovable:(unsigned int)index
{
return YES;
}
- (void)sliderScroller:(id)scrollingViewController itemWantsToBeRemoved:(unsigned int)index
{
// if it's the homescreen, respring
if (index == 0)
system("killall -9 SpringBoard");
else
%orig;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment