我在我的代码中使用以下方法:
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"myappname" withExtension:@"momd"];
当我在模拟器上运行时, 这返回一个工作 NSURL。 当我运行我的设备时, 它返回一个无效的 CFSTringRef。 我做错了什么?
Another related question, my xcode project file is named like this: "MyApp", and the end of my bundle identifier is named like this: "myapp".
我尝试过两种方法,结果都一样,但我读过资源参数字符串对案件敏感。我应该使用哪一种?