iphone-common-codes-ccteam源代码 CCInfoPlistFileReader.m
2011-12-31 09:59
274 查看
// // CCInfoPlistFileReader.m // CCFC // // Created by xichen on 11-12-18. // Copyright 2011 ccteam. All rights reserved. // #import "CCInfoPlistFileReader.h" static id InfoPlistObj; @implementation CCInfoPlistFileReader // not thread safe + (id)sharedInstance { if(InfoPlistObj == nil) { @synchronized(self) { InfoPlistObj = [[CCInfoPlistFileReader alloc] init]; } } return InfoPlistObj; } + (void)releaseInstance { [InfoPlistObj release]; InfoPlistObj = nil; } // print all keys and values in Info.plist file + (void)printAllKeysValues { NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; for(id key in [infoDict allKeys]) { NSLog(@"key is:%@, value is:%@\n", key, [infoDict objectForKey:key]); } } - (id)init { self = [super init]; if(self) _internal = [[[NSBundle mainBundle] infoDictionary] retain]; return self; } - (id)getVersion { return [_internal objectForKey:@"CFBundleVersion"]; } @end
googlecode链接地址(会有更新):http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCInfoPlistFileReader.m
相关文章推荐
- iphone-common-codes-ccteam源代码 CCInfoPlistFileReader.h
- iphone-common-codes-ccteam源代码 CCPlistFileReader.h
- iphone-common-codes-ccteam源代码 CCPlistFileReader.m
- iphone-common-codes-ccteam源代码 CCPlistFileWritter.m
- iphone-common-codes-ccteam源代码 CCFile.h
- iphone-common-codes-ccteam源代码 CCFile.m
- iphone-common-codes-ccteam源代码 CCPlistFileWritter.h
- iphone-common-codes-ccteam源代码 CCCommon.h
- iphone-common-codes-ccteam源代码 CCFileName.h
- iphone-common-codes-ccteam源代码 CCMemory.h
- iphone-common-codes-ccteam源代码 CCNSNumber.h
- iphone-common-codes-ccteam源代码 CCNSURL.m
- iphone-common-codes-ccteam源代码 CCRadix.h
- iphone-common-codes-ccteam源代码 CCTableTipView.h
- iphone-common-codes-ccteam源代码 CCUIApplication.h
- iphone-common-codes-ccteam源代码 CCUIKit.h
- iphone-common-codes-ccteam源代码 CCUIScreen.h
- iphone-common-codes-ccteam源代码 CCUITextView.h
- iphone-common-codes-ccteam源代码 CCCommon.m
- iphone-common-codes-ccteam源代码 CCFileName.m