gpt4 book ai didi

ios - -[NSDictionary dictionaryWithContentsOfFile] 在 iPad 上返回 nil;在模拟器中返回字典

转载 作者:行者123 更新时间:2023-11-28 22:23:21 25 4
gpt4 key购买 nike

我有一个方法:

#define ROOT_ASSETS_PATH @"/assets/"

...

-(NSMutableDictionary*) getContentsOfPlist{
NSString *pageContentPlistPath = [[[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: ROOT_ASSETS_PATH] stringByAppendingPathComponent:@"content.plist"];

NSMutableDictionary *mDictionary = [NSMutableDictionary dictionaryWithContentsOfFile:pageContentPlistPath];
return mDicitonary;
}

在模拟器上。这将返回一个字典。在 iPad 上,它返回 nil。确保分机案例也与通话中的案例相匹配。

有什么想法吗?

最佳答案

毕竟问题是个例。文件名的大小写与我在参数中输入的大小写不匹配。 OSX 不关心,但 iPad 关心。

关于ios - -[NSDictionary dictionaryWithContentsOfFile] 在 iPad 上返回 nil;在模拟器中返回字典,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19686187/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com