In MyApp-Info.plist, there is an entry called "Icon files", it is type of an array and there is one element in it now. What I am doing to retrieve this info by following ;
NSDictionary *plistDictionary = [[NSBundle mainBundle] infoDictionary];
NSArray *array = [plistDictionary objectForKey:@"Icon files"];
NSLog(@"array is %@",array);
However, the console shows me that there are no elements in my array...Have I done something wrong above. Please advice me on this.
Thanks
PS: there is an image about Icon files
The proper key for the "Icon files" item is CFBundleIconFiles
. You can see the rest of the actual keys by selecting the plist in the file browser, right-clicking and selecting Open As > Source Code.
When you look at your plist in Xcode, right-click on the window and select "Show Raw Keys/Values" from the menu. It will give you the actual dictionary key.
Or: NSLog(@"%@", [[NSBundle mainBundle] infoDictionary]);