Skip to content

Instantly share code, notes, and snippets.

View LacertosusRepo's full-sized avatar
🏂
Working hard (kinda)

LacertosusDeus LacertosusRepo

🏂
Working hard (kinda)
View GitHub Profile
@RedenticDev
RedenticDev / Explanations.md
Last active April 24, 2024 11:12
Xcode 12 & Theos

What's the problem?

Since June, 22nd 2020, Apple released Xcode 12, that introduced an internal change to Xcode, breaking arm64e compilation for tweak developers. This is due to the update of clang/LLVM (AFAIK) in Xcode 12.

Details of the problem

More specifically:

  • compiling code for arm64e with Xcode 11 Toolchain will allow this code to run only on iOS 13 and lower for all versions!.
  • compiling code for arm64e with Xcode 12 Toolchain will allow this code to run only for iOS 14 (and up).

No error is produced during compilation. arm64 slices are not concerned and will always work.

@MTACS
MTACS / Prefs.m
Created July 13, 2020 18:16
"Fix" for HBRespringController respringAndReturnTo: method freezing
#import "spawn.h"
#import "Prefs.h"
#import <Cephei/HBRespringController.h>
@implementation PrefsController
- (void)respring {
[HBRespringController respringAndReturnTo:[NSURL URLWithString:@"prefs:root=YourPrefs"]];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@CPDigitalDarkroom
CPDigitalDarkroom / generateIconImageWithInfo.m
Created November 13, 2019 20:51
Generate icon image on iOS 13
struct SBIconImageInfo {
struct CGSize size;
double scale;
double continuousCornerRadius;
};
- (UIImage *)iconImageForIdentifier:(NSString *)identifier {
SBIconController *iconController = [NSClassFromString(@"SBIconController") sharedInstance];
SBIcon *icon = [iconController.model expectedIconForDisplayIdentifier:identifier];
@CPDigitalDarkroom
CPDigitalDarkroom / open_shortcut.m
Created October 20, 2019 21:06
Open an app shortcut programmatically
- (void)openShortcut:(SBSApplicationShortcutItem *)shortcutItem {
UIHandleApplicationShortcutAction *openAction = [[UIHandleApplicationShortcutAction alloc] initWithSBSShortcutItem:shortcutItem];
NSDictionary *activationOptions = @{
@"__ActivateSuspended" : [NSNumber numberWithBool:(shortcutItem.activationMode == 1)],
@"__Actions": @[
openAction
],
@"__PromptUnlockDevice" : [NSNumber numberWithBool:YES],