通过代码禁用/启用调整的最佳方法是什么?另一个问题是:我如何从plist文件中读取值?谢谢 我的代码是:
%hook somethinganother
- (void)somethinghere:(_Bool)arg1
{
NSMutableDictionary *settings = [NSMutableDictionary dictionaryWithContentsOfFile:
[NSString stringWithFormat:@"%@/Library/Preferences/%@", NSHomeDirectory(), @"com.yourcompany.mytweak.plist"]];
if([[settings objectForKey:@"SomethingHere"] boolValue]) {
%orig(NO);
} else %orig;
}
%end