[iPhone] 印出info.plist中所有的keys,values

这个小范例能够打印出所有的info.plist中的keys,values

 

// get all keys and values in info.plist NSBundle* mainBundle = [NSBundle mainBundle]; NSDictionary* infoDictionary = [mainBundle infoDictionary]; id key; NSArray* keys = [infoDictionary allKeys]; NSLog(@"Display all keys and values in info.plist/n"); for(key in keys) { NSLog(@"key=%@ , value=%@/n",key,[infoDictionary objectForKey:key]); }

 

[iPhone] 印出info.plist中所有的keys,values_第1张图片

你可能感兴趣的:(iPhone)