Created
August 9, 2026 22:54
-
-
Save rooootdev/b671e1ec3d23cf777220fcb61aef8db4 to your computer and use it in GitHub Desktop.
Simple test dylib I frequently use. Probably not useful to you.
This file contains hidden or 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
| // | |
| // proof.m | |
| // proof | |
| // | |
| // Created by ruter on 10.08.26. | |
| // | |
| #import <UIKit/UIKit.h> | |
| __attribute__((constructor)) | |
| static void entry(void) { | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| UIWindow *key_win = nil; | |
| for (UIScene *scene in UIApplication.sharedApplication.connectedScenes) { | |
| if ([scene isKindOfClass:[UIWindowScene class]]) { | |
| for (UIWindow *window in ((UIWindowScene *)scene).windows) { | |
| if (window.isKeyWindow) { | |
| key_win = window; | |
| break; | |
| } | |
| } | |
| } | |
| } | |
| if (!key_win) return; | |
| UIViewController *root_vc = key_win.rootViewController; | |
| if (!root_vc) return; | |
| UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"ROOOOT.DEV // WE OUT HERE!" message:nil preferredStyle:UIAlertControllerStyleAlert]; | |
| [alert addAction:[UIAlertAction actionWithTitle:@"aight" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { | |
| [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://roooot.dev/"] options:@{} completionHandler:nil]; | |
| }]]; | |
| [root_vc presentViewController:alert animated:YES completion:nil]; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment