From 3f7e32b865223eb0d7f8c5ddd89e34fe688c4891 Mon Sep 17 00:00:00 2001 From: Halo-Michael Date: Mon, 10 Oct 2022 16:51:34 +0800 Subject: [PATCH] That would really fixup --- Store/TSUtil.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Store/TSUtil.m b/Store/TSUtil.m index 2a225b7..fa38f7f 100644 --- a/Store/TSUtil.m +++ b/Store/TSUtil.m @@ -16,9 +16,10 @@ extern int posix_spawnattr_set_persona_gid_np(const posix_spawnattr_t* __restric void chineseWifiFixup(void) { - Class K_PSAppDataUsagePolicyCache = NSClassFromString(@"PSAppDataUsagePolicyCache"); - PSAppDataUsagePolicyCache* cache = [K_PSAppDataUsagePolicyCache sharedInstance]; - [cache setUsagePoliciesForBundle:NSBundle.mainBundle.bundleIdentifier cellular:true wifi:true]; + NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/SettingsCellular.framework"]; + [bundle load]; + [[NSClassFromString(@"PSAppDataUsagePolicyCache") sharedInstance] setUsagePoliciesForBundle:NSBundle.mainBundle.bundleIdentifier cellular:true wifi:true]; + [bundle unload]; } NSString* helperPath(void) @@ -220,4 +221,4 @@ void fetchLatestTrollStoreVersion(void (^completionHandler)(NSString* latestVers }]; [task resume]; -} \ No newline at end of file +}