1
0
mirror of https://github.com/opa334/TrollStore.git synced 2026-11-08 02:15:49 +08:00
This commit is contained in:
Tyler Kushnick 2026-11-05 02:00:12 -05:00 committed by GitHub
commit ea7b958d55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -822,6 +822,9 @@ void applyPatchesToInfoDictionary(NSString* appPath)
NSArray* CFBundleURLTypes = infoDictM[@"CFBundleURLTypes"];
if([CFBundleURLTypes isKindOfClass:[NSArray class]])
{
NSDictionary* entitlements = dumpEntitlementsFromBinaryAtPath(appMainExecutablePathForAppPath(appPath));
BOOL isWebBrowser = [entitlements[@"com.apple.developer.web-browser"] isEqual:@YES];
NSMutableArray* CFBundleURLTypesM = [NSMutableArray new];
for(NSDictionary* URLType in CFBundleURLTypes)
@ -841,7 +844,9 @@ void applyPatchesToInfoDictionary(NSString* appPath)
continue;
}
if([appleSchemes containsObject:existingURLScheme.lowercaseString])
NSString* URLScheme = existingURLScheme.lowercaseString;
BOOL isWebURLScheme = [URLScheme isEqualToString:@"http"] || [URLScheme isEqualToString:@"https"];
if([appleSchemes containsObject:URLScheme] && !(isWebBrowser && isWebURLScheme))
{
[URLSchemesSet removeObject:existingURLScheme];
}