Fix Login issue
This commit is contained in:
+41
-1
@@ -29,7 +29,24 @@ NSBundle *uYouPlusBundle() {
|
||||
}
|
||||
NSBundle *tweakBundle = uYouPlusBundle();
|
||||
|
||||
//
|
||||
static NSString *accessGroupID() {
|
||||
NSDictionary *query = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
(__bridge NSString *)kSecClassGenericPassword, (__bridge NSString *)kSecClass,
|
||||
@"bundleSeedID", kSecAttrAccount,
|
||||
@"", kSecAttrService,
|
||||
(id)kCFBooleanTrue, kSecReturnAttributes,
|
||||
nil];
|
||||
CFDictionaryRef result = nil;
|
||||
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
|
||||
if (status == errSecItemNotFound)
|
||||
status = SecItemAdd((__bridge CFDictionaryRef)query, (CFTypeRef *)&result);
|
||||
if (status != errSecSuccess)
|
||||
return nil;
|
||||
NSString *accessGroup = [(__bridge NSDictionary *)result objectForKey:(__bridge NSString *)kSecAttrAccessGroup];
|
||||
|
||||
return accessGroup;
|
||||
}
|
||||
|
||||
BOOL hideHUD() {
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:@"hideHUD_enabled"];
|
||||
}
|
||||
@@ -391,6 +408,29 @@ BOOL hidePaidPromotionCard() {
|
||||
}
|
||||
%end
|
||||
|
||||
// Fix login for YouTube 17.33.2 and higher
|
||||
%hook SSOKeychainCore
|
||||
+ (NSString *)accessGroup {
|
||||
return accessGroupID();
|
||||
}
|
||||
|
||||
+ (NSString *)sharedAccessGroup {
|
||||
return accessGroupID();
|
||||
}
|
||||
%end
|
||||
|
||||
// Fix App Group Directory by move it to document directory
|
||||
%hook NSFileManager
|
||||
- (NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier {
|
||||
if (groupIdentifier != nil) {
|
||||
NSArray *paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask];
|
||||
NSURL *documentsURL = [paths lastObject];
|
||||
return [documentsURL URLByAppendingPathComponent:@"AppGroup"];
|
||||
}
|
||||
return %orig(arg1);
|
||||
}
|
||||
%end
|
||||
|
||||
# pragma mark - OLED dark mode by BandarHL
|
||||
UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:1.0];
|
||||
%group gOLED
|
||||
|
||||
Reference in New Issue
Block a user