首页 > 代码库 > 获取info.plist的信息的代码

获取info.plist的信息的代码

 NSString *CurPath = [[NSBundle mainBundle] bundlePath];

NSString *xmlPath = [CurPath stringByAppendingPathComponent:@"/Contents/Info.plist"];

NSMutableDictionary* dict = [[ NSMutableDictionary alloc ] initWithContentsOfFile:xmlPath];

NSString* Ver = [dict objectForKey:@"CFBundleShortVersionString"];

 

 NSDictionary * info = [[NSBundle mainBundle] infoDictionary];

    [self.window setTitle:[info objectForKey:(NSString *)kCFBundleExecutableKey]];

获取info.plist的信息的代码