mirror of
				https://github.com/opa334/TrollStore.git
				synced 2025-11-04 15:42:35 +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"];
 | 
						NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/SettingsCellular.framework"];
 | 
				
			||||||
	[bundle load];
 | 
						[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)
 | 
					void loadMCMFramework(void)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user