Xcode cannot find referenced Storyboard using Cocoapods

后端 未结 2 1968
孤独总比滥情好
孤独总比滥情好 2021-02-08 03:21

I\'m trying to create a Pod using CocoaPods and I want to bundle a \"Demo\" Storyboard that I can reference to from the Main Storyboard from my example application. The problem

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-08 03:57

    To reference storyboard using cocoapods, you should set in the Bundle section, the bundle identifier of the pod, like the picture below:

    And in your podspec file, you should add the reference of your storyboard (as resource and not bundle)

    s.resource = 'MyPod/MyStoryboardName.storyboard'

    After the pod update, everything will work as expected

    Hope that helps

提交回复
热议问题