Skip to content

Instantly share code, notes, and snippets.

@MTACS
Created December 26, 2022 15:38
Show Gist options
  • Save MTACS/154b6b0a556932534f2356906e4981c7 to your computer and use it in GitHub Desktop.
Save MTACS/154b6b0a556932534f2356906e4981c7 to your computer and use it in GitHub Desktop.
Kill all running apps iOS 16+
@interface SBAppLayout : NSObject
@end
@interface SBFluidSwitcherItemContainer: UIView
@end
@interface SBFluidSwitcherViewController: UIViewController
@property (readonly, nonatomic) NSArray *appLayouts;
- (id)_itemContainerForAppLayoutIfExists:(id)arg0;
- (void)killContainer:(id)arg0 forReason:(NSInteger)arg1;
@end
%hook SBFluidSwitcherViewController
%new
- (void)terminateRunningApps {
for (SBAppLayout *item in self.appLayouts) {
SBFluidSwitcherItemContainer *container = [self _itemContainerForAppLayoutIfExists:item];
[self killContainer:container forReason:0];
}
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment