Storyboard reference to cocoapods storyboard seems broken

余生颓废 提交于 2019-12-04 23:10:30

问题


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.


回答1:


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!



来源:https://stackoverflow.com/questions/37270236/storyboard-reference-to-cocoapods-storyboard-seems-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!