简体   繁体   English

故事板对cocoapods故事板的引用似乎已经破裂

[英]Storyboard reference to cocoapods storyboard seems broken

I have a project called "ViewTester" with a cocoapod linked to it called "blub" 我有一个名为“ViewTester”的项目,其中有一个名为“blub”的cocoapod

项目结构

Now in the main.storyboard i want to reference blubstory.storyboard like so: 现在在main.storyboard中我想像这样引用blubstory.storyboard: 故事板参考

Properties of the storyboard reference: 故事板参考的属性:
在此输入图像描述

BundleID of ViewTester: ViewTester的BundleID:
在此输入图像描述

BundleID of blub: blub的BundleID:
在此输入图像描述

When i try to run this i get the following exception: 当我尝试运行此时,我得到以下异常: 在此输入图像描述

I saw a related stackoverflow post here , but the answer did not resolve the issue as there are is no target membership for "blub" in main.storyboard 我在这里看到了一个相关的stackoverflow帖子,但答案没有解决问题,因为main.storyboard中没有“blub”的目标成员资格

在此输入图像描述

Any ideas / solutions on this issue? 有关此问题的任何想法/解决方案? To me it seems like a bug in storyboard referencing as it doesn't look for the storyboard in the "blub" bundle. 对我而言,它似乎是故事板引用中的一个错误,因为它不会在“blub”包中找到故事板。

I solved this by changing the bundle identifier on the storyboard reference: 我通过更改storyboard参考上的包标识符解决了这个问题:

在此输入图像描述

Appearantly the bundle identifier does get taken into consideration by the storyboard reference. 很明显,故事板标识符确实被故事板引用考虑在内。 It's just that when it is not OK it prints out a really weird non informative exception, like the one in my question above. 只是当它不正常时,它会打印出一个非常奇怪的非信息性异常,就像我上面的问题中那样。 If your bundle ID is correct it will work! 如果您的捆绑包ID正确,它将起作用!

Also: when cocoapods adds your pod to another project it creates a target of your pod with the bundle identifier "org.cocoapods.your_pod_name_here" instead of your bundle identifier! 另外:当cocoapods将您的pod添加到另一个项目时,它会使用包标识符“org.cocoapods.your_pod_name_here”而不是您的包标识符创建您的pod的目标!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM