Skip to content

Commit 75b7b49

Browse files
Merge branch 'main' into renderer/mobileglues
2 parents ab2dfef + 1717632 commit 75b7b49

14 files changed

Lines changed: 62 additions & 48 deletions
-277 KB
Binary file not shown.
280 KB
Binary file not shown.

Natives/Info.plist

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
<dict>
1717
<key>CFBundleAlternateIcons</key>
1818
<dict>
19-
<key>AppIcon-Development</key>
19+
<key>AppIcon-Dark</key>
2020
<dict>
2121
<key>CFBundleIconFiles</key>
2222
<array>
23-
<string>AppIcon-Development60x60</string>
23+
<string>AppIcon-Dark60x60</string>
2424
</array>
2525
</dict>
26-
<key>AppIcon-Dark</key>
26+
<key>AppIcon-Development</key>
2727
<dict>
2828
<key>CFBundleIconFiles</key>
2929
<array>
30-
<string>AppIcon-Dark60x60</string>
30+
<string>AppIcon-Development60x60</string>
3131
</array>
3232
</dict>
3333
</dict>
@@ -98,17 +98,19 @@
9898
</array>
9999
<key>CFBundleVersion</key>
100100
<string>1.0</string>
101-
<key>GCSupportsControllerUserInteraction</key>
102-
<true/>
103-
<key>UILaunchStoryboardName</key>
104-
<string>LaunchScreen</string>
105101
<key>GCSupportedGameControllers</key>
106102
<array>
107103
<dict>
108104
<key>ProfileName</key>
109105
<string>ExtendedGamepad</string>
110106
</dict>
111107
</array>
108+
<key>GCSupportsControllerUserInteraction</key>
109+
<true/>
110+
<key>GCSupportsGameMode</key>
111+
<true/>
112+
<key>LSApplicationCategoryType</key>
113+
<string>public.app-category.games</string>
112114
<key>LSApplicationQueriesSchemes</key>
113115
<array>
114116
<string>filza</string>
@@ -161,6 +163,8 @@
161163
<array>
162164
<string>fetch</string>
163165
</array>
166+
<key>UIDesignRequiresCompatibility</key>
167+
<true/>
164168
<key>UIDeviceFamily</key>
165169
<array>
166170
<integer>1</integer>
@@ -169,6 +173,8 @@
169173
</array>
170174
<key>UIFileSharingEnabled</key>
171175
<true/>
176+
<key>UILaunchStoryboardName</key>
177+
<string>LaunchScreen</string>
172178
<key>UIRequiredDeviceCapabilities</key>
173179
<array>
174180
<string>arm64</string>
@@ -189,11 +195,11 @@
189195
<string>UIInterfaceOrientationLandscapeLeft</string>
190196
<string>UIInterfaceOrientationLandscapeRight</string>
191197
</array>
192-
<key>UIWhitePointAdaptivityStyle</key>
193-
<string>UIWhitePointAdaptivityStyleGame</string>
194-
<key>UIViewControllerBasedStatusBarAppearance</key>
195-
<true/>
196198
<key>UISupportsDocumentBrowser</key>
197199
<true/>
200+
<key>UIViewControllerBasedStatusBarAppearance</key>
201+
<true/>
202+
<key>UIWhitePointAdaptivityStyle</key>
203+
<string>UIWhitePointAdaptivityStyleGame</string>
198204
</dict>
199205
</plist>

Natives/JavaLauncher.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,15 @@ void init_loadCustomJvmFlags(int* argc, const char** argv) {
100100
int launchJVM(NSString *username, id launchTarget, int width, int height, int minVersion) {
101101
NSLog(@"[JavaLauncher] Beginning JVM launch");
102102

103-
if (NSBundle.mainBundle.infoDictionary[@"LCDataUUID"]) {
103+
if ([NSFileManager.defaultManager fileExistsAtPath:[NSBundle.mainBundle.bundlePath stringByAppendingPathComponent:@"LCAppInfo.plist"]]) {
104104
NSDebugLog(@"[JavaLauncher] Running in LiveContainer, skipping dyld patch");
105105
} else {
106-
// Activate Library Validation bypass for external runtime and dylibs (JNA, etc)
107-
init_bypassDyldLibValidation();
106+
if(@available(iOS 19.0, *)) {
107+
// Disable Library Validation bypass for iOS 26 because of stricter JIT
108+
} else {
109+
// Activate Library Validation bypass for external runtime and dylibs (JNA, etc)
110+
init_bypassDyldLibValidation();
111+
}
108112
}
109113

110114

Natives/LauncherNavigationController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
334334
UIKit_launchMinecraftSurfaceVC(self.view.window, self.task.metadata);
335335
}];
336336
} else {
337-
self.task = nil;
338-
[self setInteractionEnabled:YES forDownloading:YES];
339337
[self reloadProfileList];
340338
}
339+
self.task = nil;
340+
[self setInteractionEnabled:YES forDownloading:YES];
341341
});
342342
}
343343

Natives/LauncherNewsViewController.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ - (void)viewDidLoad
2828
CGSize size = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);
2929
insets = UIApplication.sharedApplication.windows.firstObject.safeAreaInsets;
3030

31-
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://angelauramc.dev/wiki/changelogs/IOS.html"]];
31+
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://wiki.angelauramc.dev/patchnotes/changelogs/IOS.html"]];
3232

3333
WKWebViewConfiguration *webConfig = [[WKWebViewConfiguration alloc] init];
3434
webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:webConfig];
@@ -47,25 +47,31 @@ - (void)viewDidLoad
4747

4848
if(!isJailbroken && getPrefBool(@"warnings.limited_ram_warn") && (roundf(NSProcessInfo.processInfo.physicalMemory / 0x1000000) < 3900)) {
4949
// "This device has a limited amount of memory available."
50-
[self showWarningAlert:@"limited_ram" hasPreference:YES];
50+
[self showWarningAlert:@"limited_ram" hasPreference:YES exitWhenCompleted:NO];
5151
}
5252

5353
self.navigationItem.leftBarButtonItem = self.splitViewController.displayModeButtonItem;
5454
self.navigationItem.rightBarButtonItem = [sidebarViewController drawAccountButton];
5555
self.navigationItem.leftItemsSupplementBackButton = true;
5656
}
5757

58-
-(void)showWarningAlert:(NSString *)key hasPreference:(BOOL)isPreferenced {
58+
-(void)showWarningAlert:(NSString *)key hasPreference:(BOOL)isPreferenced exitWhenCompleted:(BOOL)shouldExit {
5959
UIAlertController *warning = [UIAlertController
6060
alertControllerWithTitle:localize([NSString stringWithFormat:@"login.warn.title.%@", key], nil)
61-
message:localize([NSString stringWithFormat:@"login.warn.title.%@", key], nil)
61+
message:localize([NSString stringWithFormat:@"login.warn.message.%@", key], nil)
6262
preferredStyle:UIAlertControllerStyleAlert];
6363

6464
UIAlertAction *action;
6565
if(isPreferenced) {
6666
action = [UIAlertAction actionWithTitle:localize(@"OK", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) {
6767
setPrefBool([NSString stringWithFormat:@"warnings.%@_warn", key], NO);
6868
}];
69+
} else if(shouldExit) {
70+
action = [UIAlertAction actionWithTitle:localize(@"OK", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) {
71+
[UIApplication.sharedApplication performSelector:@selector(suspend)];
72+
usleep(100*1000);
73+
exit(0);
74+
}];
6975
} else {
7076
action = [UIAlertAction actionWithTitle:localize(@"OK", nil) style:UIAlertActionStyleCancel handler:nil];
7177
}

Natives/UIKit+hook.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#import <UIKit/UIKit.h>
22

3-
#define realUIIdiom UIDevice.currentDevice.hook_userInterfaceIdiom
3+
#define realUIIdiom UIDevice.currentDevice.userInterfaceIdiom
44
extern NSNotificationName UIPresentationControllerPresentationTransitionWillBeginNotification;
55

66
@interface UIDevice(hook)
77
- (NSString *)completeOSVersion;
8-
- (UIUserInterfaceIdiom)hook_userInterfaceIdiom;
98
@end
109

1110
@interface UIImageView(hook)
@@ -27,12 +26,17 @@ extern NSNotificationName UIPresentationControllerPresentationTransitionWillBegi
2726

2827
@interface UIDevice(private)
2928
- (NSString *)buildVersion;
29+
- (void)_setActiveUserInterfaceIdiom:(NSInteger)idiom;
3030
@end
3131

3232
@interface UIImage(private)
3333
- (UIImage *)_imageWithSize:(CGSize)size;
3434
@end
3535

36+
@interface UIScreen(private)
37+
- (void)_setUserInterfaceIdiom:(NSInteger)idiom;
38+
@end
39+
3640
@interface UITextField(private)
3741
@property(assign, nonatomic) NSInteger nonEditingLinebreakMode;
3842
@end

Natives/UIKit+hook.m

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ void swizzleUIImageMethod(SEL originalAction, SEL swizzledAction) {
2929
}
3030

3131
void init_hookUIKitConstructor(void) {
32-
swizzle(UIDevice.class, @selector(userInterfaceIdiom), @selector(hook_userInterfaceIdiom));
32+
UIUserInterfaceIdiom idiom = getPrefBool(@"debug.debug_ipad_ui") ? UIUserInterfaceIdiomPad : UIUserInterfaceIdiomPhone;
33+
[UIDevice.currentDevice _setActiveUserInterfaceIdiom:idiom];
34+
[UIScreen.mainScreen _setUserInterfaceIdiom:idiom];
35+
3336
swizzle(UIImageView.class, @selector(setImage:), @selector(hook_setImage:));
3437
if(UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) {
3538
swizzle(UIPointerInteraction.class, @selector(_updateInteractionIsEnabled), @selector(hook__updateInteractionIsEnabled));
@@ -58,16 +61,6 @@ - (NSString *)completeOSVersion {
5861
return [NSString stringWithFormat:@"%@ %@ (%@)", self.systemName, self.systemVersion, self.buildVersion];
5962
}
6063

61-
- (UIUserInterfaceIdiom)hook_userInterfaceIdiom {
62-
if (getPrefBool(@"debug.debug_ipad_ui")) {
63-
return UIUserInterfaceIdiomPad;
64-
} else if (self.hook_userInterfaceIdiom == UIUserInterfaceIdiomTV) {
65-
return self.hook_userInterfaceIdiom;
66-
} else {
67-
return UIUserInterfaceIdiomPhone;
68-
}
69-
}
70-
7164
@end
7265

7366
// Patch: emulate scaleToFill for table views

Natives/authenticator/MicrosoftAuthenticator.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ - (void)refreshTokenWithCallback:(Callback)callback {
222222
return;
223223
}
224224

225-
[self saveChanges];
226-
227225
if ([NSDate.date timeIntervalSince1970] > [self.authData[@"expiresAt"] longValue]) {
228226
[self acquireAccessToken:self.tokenData[@"refreshToken"] refresh:YES callback:callback];
229227
} else {

Natives/dyld_bypass_validation.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ bool searchAndPatch(char *name, char *base, char *signature, int length, void *t
124124

125125
int hooked___fcntl(int fildes, int cmd, void *param) {
126126
if (cmd == F_ADDFILESIGS_RETURN) {
127-
const char *homeDir = getenv("POJAV_HOME");
127+
const char *homeDir = getenv("CFFIXED_USER_HOME");
128128
char filePath[PATH_MAX];
129129
bzero(filePath, sizeof(filePath));
130130

0 commit comments

Comments
 (0)