从iOS中的plist文件读取int

时间:2013-01-09 23:36:01

标签: iphone ios objective-c plist nsdictionary

我需要一些从plist文件中读取的帮助。 这是我的代码,但它不起作用,我不再有想法了。我想构建一个读取此plist com.mi.pp1.plist整数的dylib。

Bux = [[[NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mi.pp1.plist"]valueForKey:@"kBux"]intValue];

%hook PPPlayerData
- (int)bux
{
    return Bux;
}
%end

1 个答案:

答案 0 :(得分:0)

int Bux;

Bux = [[[NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences    /com.mi.pp1.plist"]objectForKey:@"kBux"]intValue];

%hook PPPlayerData
- (int)bux
{
return Bux;
}

作品

相关问题