I am using settings bundle for my app. I could not access root.plist and root.strings file of settings bundle from the following code. Could anyone help?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *plist = [[NSBundle mainBundle] pathForResource:@"Root" ofType:@"plist"];
开发者_运维知识库NSDictionary *rootofplist = [NSDictionary dictionaryWithContentsOfFile:plist];
NSArray *preferenceitems = (NSArray *) [rootofplist valueForKey:@"PreferenceSpecifiers"];
}
iPhone is case sensitive, try @"root" instead of @"Root"...
精彩评论