【发布时间】:2025-12-29 19:55:16
【问题描述】:
我需要一些帮助来读取 plist 文件。 这是我的代码,但它不起作用,我不再有想法了。我想构建一个 dylib 来读取这个 plist com.mi.pp1.plist 的整数。
Bux = [[[NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mi.pp1.plist"]valueForKey:@"kBux"]intValue];
%hook PPPlayerData
- (int)bux
{
return Bux;
}
%end
【问题讨论】:
-
这是否适用于越狱设备?在普通设备上运行的普通应用无法访问这样的文件。
-
是的。我不确定我是否可以为非越狱创建 dylib。
-
@RamyAlZuhouri iphonedevwiki.net/index.php/Logos#.25hook
-
有了这个你可以挂钩到进程。
-
你应该打电话给
objectForKey:,而不是valueForKey:。
标签: iphone ios objective-c plist nsdictionary