mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
Safer Google Sign In Patch (uYouPlusPatches.xm)
I’m reworking the patch, previously it was not safe to even be used in iOS 26. So I’m experimenting with an updated version of it.
This commit is contained in:
parent
f593694438
commit
0b864affc7
1 changed files with 20 additions and 5 deletions
|
|
@ -2,14 +2,29 @@
|
|||
|
||||
# pragma mark - YouTube patches
|
||||
|
||||
// Fix Google Sign in by @PoomSmart and @level3tjg (qnblackcat/uYouPlus#684)
|
||||
// Fix Google Sign in Patch
|
||||
%group gGoogleSignInPatch
|
||||
%hook NSBundle
|
||||
- (NSDictionary *)infoDictionary {
|
||||
NSMutableDictionary *info = %orig.mutableCopy;
|
||||
if ([self isEqual:NSBundle.mainBundle])
|
||||
info[@"CFBundleIdentifier"] = @"com.google.ios.youtube";
|
||||
return info;
|
||||
NSDictionary *orig = %orig;
|
||||
if ([self isEqual:NSBundle.mainBundle]) {
|
||||
NSArray<NSString *> *stack = [NSThread callStackSymbols];
|
||||
BOOL needsSpoof = NO;
|
||||
for (NSString *frame in stack) {
|
||||
if ([frame containsString:@"GIDSignIn"] ||
|
||||
[frame containsString:@"GTMSessionFetcher"] ||
|
||||
[frame containsString:@"GoogleSignIn"]) {
|
||||
needsSpoof = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (needsSpoof) {
|
||||
NSMutableDictionary *patched = [orig mutableCopy];
|
||||
patched[@"CFBundleIdentifier"] = @"com.google.ios.youtube";
|
||||
return [patched copy];
|
||||
}
|
||||
}
|
||||
return orig;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
|
|
|||
Loading…
Reference in a new issue