Search code examples
iosswiftstoryboardcocoapodsassets

Include Non Code Files in Pod


We are creating a private pod and would like to add following files with it.

  • images
  • sound files
  • storyboards
  • views/cells

Just wondering where we should mention those files in .podspec file?


Solution

  • See the documentation for podspec resources, example:

    spec.resources = ['Images/*.png', 'Sounds/*']
    

    Also see resource bundles, example:

    spec.resource_bundles = {
        'MapBox' => ['MapView/Map/Resources/*.png'],
        'OtherResources' => ['MapView/Map/OtherResources/*.png']
    }