Last active
September 24, 2022 08:34
-
-
Save AhmedBafkir/0c16b806b3fb233995aa01b93da44f93 to your computer and use it in GitHub Desktop.
Fix YouTube sign in for iOS sideloaded > idea by @kkirby
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
// https://github.com/qnblackcat/uYouPlus/discussions/447#discussioncomment-3672653 | |
%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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment