fix Google sign in, again. Thanks to @AhmedBafkir and @kkirby - https://gist.github.com/AhmedBafkir/0c16b806b3fb233995aa01b93da44f93
This commit is contained in:
@@ -62,7 +62,6 @@ extern BOOL replacePreviousAndNextButton();
|
|||||||
return YES;
|
return YES;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
YTSettingsSectionItem *fixGoogleSigin = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"FIX_GOOGLE_SIGNIN") titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")];
|
YTSettingsSectionItem *fixGoogleSigin = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"FIX_GOOGLE_SIGNIN") titleDescription:LOC(@"FIX_GOOGLE_SIGNIN_DESC")];
|
||||||
fixGoogleSigin.hasSwitch = YES;
|
fixGoogleSigin.hasSwitch = YES;
|
||||||
fixGoogleSigin.switchVisible = YES;
|
fixGoogleSigin.switchVisible = YES;
|
||||||
@@ -71,7 +70,6 @@ extern BOOL replacePreviousAndNextButton();
|
|||||||
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"fixGoogleSigin_enabled"];
|
[[NSUserDefaults standardUserDefaults] setBool:enabled forKey:@"fixGoogleSigin_enabled"];
|
||||||
return YES;
|
return YES;
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")];
|
YTSettingsSectionItem *hidePaidPromotionCard = [[%c(YTSettingsSectionItem) alloc] initWithTitle:LOC(@"HIDE_PAID_PROMOTION_CARDS") titleDescription:LOC(@"HIDE_PAID_PROMOTION_CARDS_DESC")];
|
||||||
hidePaidPromotionCard.hasSwitch = YES;
|
hidePaidPromotionCard.hasSwitch = YES;
|
||||||
|
|||||||
+28
-4
@@ -49,6 +49,7 @@ static NSString *accessGroupID() {
|
|||||||
return accessGroup;
|
return accessGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
BOOL hideHUD() {
|
BOOL hideHUD() {
|
||||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||||
}
|
}
|
||||||
@@ -482,6 +483,30 @@ BOOL replacePreviousAndNextButton() {
|
|||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
// Fix "Google couldn't confirm this attempt to sign in is safe. If you think this is a mistake, you can close and try again to sign in" - qnblackcat/uYouPlus#420
|
||||||
|
// Thanks to @AhmedBafkir and @kkirby - https://github.com/qnblackcat/uYouPlus/discussions/447#discussioncomment-3672881
|
||||||
|
%group gFixGoogleSignIn
|
||||||
|
%hook SSORPCService
|
||||||
|
+ (id)URLFromURL:(id)arg1 withAdditionalFragmentParameters:(NSDictionary *)arg2 {
|
||||||
|
NSURL *orig = %orig;
|
||||||
|
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:orig resolvingAgainstBaseURL:NO];
|
||||||
|
NSMutableArray *newQueryItems = [urlComponents.queryItems mutableCopy];
|
||||||
|
for (NSURLQueryItem *queryItem in urlComponents.queryItems) {
|
||||||
|
if ([queryItem.name isEqualToString:@"system_version"]
|
||||||
|
|| [queryItem.name isEqualToString:@"app_version"]
|
||||||
|
|| [queryItem.name isEqualToString:@"kdlc"]
|
||||||
|
|| [queryItem.name isEqualToString:@"kss"]
|
||||||
|
|| [queryItem.name isEqualToString:@"lib_ver"]
|
||||||
|
|| [queryItem.name isEqualToString:@"device_model"]) {
|
||||||
|
[newQueryItems removeObject:queryItem];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
urlComponents.queryItems = [newQueryItems copy];
|
||||||
|
return urlComponents.URL;
|
||||||
|
}
|
||||||
|
%end
|
||||||
|
%end
|
||||||
|
|
||||||
// Fix "You can't sign in to this app because Google can't confirm that it's safe" warning when signing in. by julioverne & PoomSmart
|
// Fix "You can't sign in to this app because Google can't confirm that it's safe" warning when signing in. by julioverne & PoomSmart
|
||||||
// https://gist.github.com/PoomSmart/ef5b172fd4c5371764e027bea2613f93
|
// https://gist.github.com/PoomSmart/ef5b172fd4c5371764e027bea2613f93
|
||||||
// https://github.com/qnblackcat/uYouPlus/pull/398
|
// https://github.com/qnblackcat/uYouPlus/pull/398
|
||||||
@@ -508,7 +533,6 @@ BOOL replacePreviousAndNextButton() {
|
|||||||
+ (NSString *)accessGroup {
|
+ (NSString *)accessGroup {
|
||||||
return accessGroupID();
|
return accessGroupID();
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSString *)sharedAccessGroup {
|
+ (NSString *)sharedAccessGroup {
|
||||||
return accessGroupID();
|
return accessGroupID();
|
||||||
}
|
}
|
||||||
@@ -898,7 +922,7 @@ static void replaceTab(YTIGuideResponse *response) {
|
|||||||
if (@available(iOS 16, *)) {
|
if (@available(iOS 16, *)) {
|
||||||
%init(iOS16);
|
%init(iOS16);
|
||||||
}
|
}
|
||||||
// if (!fixGoogleSigin()) {
|
if (!fixGoogleSigin()) {
|
||||||
// %init(gDevice_challenge_request_hack);
|
%init(gFixGoogleSignIn);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user