modify the MyApp-Info.plist

Go To StackoverFlow.com

0

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

enter image description here

2012-04-05 20:31
by tranvutuan


1

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.

2012-04-05 20:57
by Nick
I have not tried it yet.Is it possible to add or remove item for CFBundleIconFiles by programming - tranvutuan 2012-04-06 00:46


1

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]);

2012-04-05 20:42
by Phillip Mills
Ads