6

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

project structure

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

Properties of the storyboard reference:
enter image description here

BundleID of ViewTester:
enter image description here

BundleID of blub:
enter image description here

When i try to run this i get the following exception: enter image description here

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

enter image description here

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.

ErikBrandsma
  • 1,661
  • 2
  • 20
  • 46

1 Answers1

20

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

enter image description here

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!

ErikBrandsma
  • 1,661
  • 2
  • 20
  • 46
  • Glad you found a solution! It surprises me that the bundle identifier is a freeform string property. This sort of problem would be avoidable if it were a combo box (like the Storyboard property above it) populated with known bundle identifiers in the project. I'm repurposing your bug (radar://26267206) for this enhancement. – Quinn Taylor May 19 '16 at 00:24
  • 1
    How the HELL did you find that?! Thanks a lot, it saved my day. – Martin Dec 04 '17 at 15:03
  • 1
    @Martin So basically, this was the subject of my master thesis and I simply HAD TO GET IT DONE before (then) next week. So i tried everything and anything in a coffee infused rampage and luckily it worked :) – ErikBrandsma Dec 05 '17 at 10:33