XCode在路径上没有有效的编译故事板 [英] XCode no valid compiled storyboard at path
问题描述
我有一个适用于iPad和iPhone的通用XCode项目(ObjC),其中包含一个包含故事板的子项目。
子项目是一个已添加到主项目的静态库。此子项目中包含一个包含bespoken故事板的包。
I've got a universal XCode Project (ObjC) for iPad and iPhone with a subproject that contains a storyboard. The subproject is a static library that has been added to the main project. Included in this subproject is a bundle containing bespoken storyboard.
当我点击应用程序的某个按钮时,需要加载故事板;
Whenenver I tap a certain button the application, the storyboard needs to be loaded;
[UIStoryboard storyboardWithName:@"UIControls.bundle/Config" bundle:nil];
这对iPhone(设备和模拟器)来说非常好,但每当我尝试运行项目时一个iPad(设备或模拟器),我收到以下错误;
That works perfectly fine for the iPhone (devices and simulators), but whenever I try to run the project an an iPad (device or simulator), I'm getting the following error;
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'There doesn't seem to be a valid compiled storyboard at path...
什么是约?该项目是一个通用项目,为什么iPad不能找到故事板?
What's the about? The project is a universal project, so why can't the iPad find the storyboard?
推荐答案
回答我自己的问题;
当捆绑目标不是通用时,会出现此错误。
因此,请确保捆绑包的构建设置中的目标设备系列设置为iPhone和iPad。
This error appears when the bundle target isn't universal. So make sure the Targeted Device Family in the bundle's build settings is set to iPhone AND iPad.
这篇关于XCode在路径上没有有效的编译故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!