This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import ObjectiveC | |
import CoreServices | |
// LSApplicationWorkspace * | |
fileprivate var applicationWorkspace: AnyObject { | |
let isa: AnyClass = objc_lookUpClass("LSApplicationWorkspace")! | |
let cmd = sel_registerName("defaultWorkspace") | |
let method = class_getClassMethod(isa, cmd) | |
let imp = method_getImplementation(method!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#include <substrate.h> | |
#include <dlfcn.h> | |
#import <sys/sysctl.h> | |
namespace mtt_ptrace { | |
int (*original)(int _request, pid_t _pid, caddr_t _addr, int _data); | |
int custom(int _request, pid_t _pid, caddr_t _addr, int _data) { | |
if (_request == 31 /* PT_DENY_ATTACH */) { | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Swift.Never: MyData { | |
var body: Never { | |
fatalError() | |
} | |
} | |
struct AnyData: MyData { | |
typealias Body = Never | |
private let __data: any MyData | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
TabView { | |
Color.red | |
.ignoresSafeArea() | |
.tabItem { | |
Label("Red", systemImage: "1.circle.fill") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import RegexBuilder | |
struct ContentView: View { | |
@Environment(\.windowScene) private var windowScene | |
var body: some View { | |
Button("Print UIWindowScene") { | |
if let windowScene { | |
print(windowScene) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
@Observable | |
final class GoodColor: Identifiable { | |
var color: Color | |
var id: Color { | |
print(_color) | |
return color | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import SwiftUI | |
struct MyView: View { | |
@State var number: Int = .zero | |
var body: some View { | |
MyViewController.SwiftUIView(number: $number) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
#import <objc/message.h> | |
#import <objc/runtime.h> | |
#import <MultipeerConnectivity/MultipeerConnectivity.h> | |
namespace _MCAlertController { | |
namespace show { | |
void (*original)(id, SEL); | |
void custom(__kindof UIViewController *self, SEL _cmd) { | |
UIWindowScene *activeWindowScene = nil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
#import <objc/message.h> | |
#import <objc/runtime.h> | |
NSNotificationCenter * __viewGeometryNotificationCenter; | |
id (*nc_originalInit)(id, SEL); | |
id nc_customInit(id self, SEL _cmd) { | |
__viewGeometryNotificationCenter = self; | |
return nc_originalInit(self, _cmd); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
NS_ASSUME_NONNULL_BEGIN | |
UIKIT_EXTERN BOOL UIImagePickerLoadPhotoLibraryIfNecessary(void); | |
UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerAllowsEditing; | |
UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerVideoQuality; | |
UIKIT_EXTERN UIImagePickerControllerInfoKey const UIImagePickerControllerVideoMaximumDuration; | |
UIKIT_EXTERN UIImagePickerControllerInfoKey const _UIImagePickerControllerFullScreenImage; |
NewerOlder