mirror of
				https://github.com/opa334/TrollStore.git
				synced 2025-11-04 07:32:36 +08:00 
			
		
		
		
	add safety check
This commit is contained in:
		
							parent
							
								
									59eae957e9
								
							
						
					
					
						commit
						c572b1b84c
					
				@ -18,7 +18,12 @@ void chineseWifiFixup(void)
 | 
			
		||||
{
 | 
			
		||||
	NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/SettingsCellular.framework"];
 | 
			
		||||
	[bundle load];
 | 
			
		||||
	[[NSClassFromString(@"PSAppDataUsagePolicyCache") sharedInstance] setUsagePoliciesForBundle:NSBundle.mainBundle.bundleIdentifier cellular:true wifi:true];
 | 
			
		||||
 | 
			
		||||
	PSAppDataUsagePolicyCache* policyCache = [NSClassFromString(@"PSAppDataUsagePolicyCache") sharedInstance];
 | 
			
		||||
	if([policyCache respondsToSelector:@selector(setUsagePoliciesForBundle:cellular:wifi:)])
 | 
			
		||||
	{
 | 
			
		||||
		[policyCache setUsagePoliciesForBundle:NSBundle.mainBundle.bundleIdentifier cellular:true wifi:true];
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void loadMCMFramework(void)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user