故事板对cocoapods故事板的引用似乎已经破裂 [英] Storyboard reference to cocoapods storyboard seems broken

查看:185
本文介绍了故事板对cocoapods故事板的引用似乎已经破裂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为ViewTester的项目,其中有一个名为blub的cocoapod





现在在main.storyboard中我想像这样引用blubstory.storyboard:



故事板参考的属性:



ViewTester的BundleID:



blub的BundleID:



当我尝试运行时,我得到以下异常:



我看到一个相关的stackoverflow帖子



有关此问题的任何想法/解决方案?对我而言,它似乎是故事板引用中的一个错误,因为它不会在blub包中找到故事板。

解决方案

我通过更改故事板参考上的包标识符解决了这个问题:





故障排除参考可以考虑捆绑标识符。只是当它不正常时,它会打印出一个非常奇怪的非信息性异常,就像上面我的问题中那样。如果您的捆绑包ID正确,它将起作用!



此外:当cocoapods将您的pod添加到另一个项目时,它会使用包标识符org.cocoapods.your_pod_name_here创建您的pod目标而不是你的包标识符!


I have a project called "ViewTester" with a cocoapod linked to it called "blub"

Now in the main.storyboard i want to reference blubstory.storyboard like so:

Properties of the storyboard reference:

BundleID of ViewTester:

BundleID of blub:

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

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.

解决方案

I solved this by changing the bundle identifier on the storyboard reference:

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!

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故事板的引用似乎已经破裂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆