开发者

accessing root.strings from settings.bundle?

开发者 https://www.devze.com 2023-02-19 10:45 出处:网络
I am using settings bundle for my app. I could not access root.plist and root.strings fileof settings bundle from the following code.Could anyone help?

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"...

0

精彩评论

暂无评论...
验证码 换一张
取 消