title: CocoaPod spec: Unable to find other source ref for Model.xcdatamodeld
body: <p>I am trying to create a pod with CoreData model inside. I've followed the tips to use <code>resources</code> and <code>reserve_path</code>. But when I try to <code>lint</code> the spec with <code>pod lib lint</code> there is this weird error that I don't even understand:</p>
  
  <pre><code>- ERROR | [iOS] unknown: Encountered an unknown error (Unable to find other source ref for /Users/rzolin/Projects/ArmorText/iOS-Pod-Test/SampleMessengerCocoapodFramework/SampleMessengerCocoapodFramework/Code/DataManagement/Model/Model.xcdatamodeld/Model.xcdatamodel/contents for target SampleMessengerCocoapodFramework.) during validation.
  </code></pre>
  
  <p>The spec is based on couple of subspecs, which could complicate the issue a bit. And search on the Internet didn't produce any help so far.</p>
  
  <p>There is a <a href="https://github.com/rzolin/SampleMessengerCocoapodFramework" rel="noreferrer">test spec</a> that replicates the error, if somebody is willing to take a look.</p>
  
  <p>The full spec is here:</p>
  
  <pre><code>Pod::Spec.new do |s|
      s.name             = 'SampleMessengerCocoapodFramework'
      s.version          = '0.2.0'
      s.summary          = 'some desc'
  
      s.description      = &lt;&lt;-DESC
      some desc
      DESC
  
      s.homepage         = 'http://www.example.com'
      s.license          = { :type =&gt; 'MIT', :file =&gt; 'LICENSE' }
      s.author           = { 'rzolin' =&gt; 'rzolin@gmail.com' }
      s.source           = { :git =&gt; 'https://github.com/rzolin/SampleMessengerCocoapodFramework.git', :tag =&gt; s.version.to_s }
  
      # Platform setup
      s.requires_arc = true
      s.ios.deployment_target = '8.0'
  
      s.default_subspec = 'Core'
  
      ### Subspecs
      s.subspec 'Core' do |cs|
          cs.dependency 'SampleMessengerCocoapodFramework/DataManagement'
          cs.dependency 'SampleMessengerCocoapodFramework/Networking'
      end
  
      s.subspec 'DataManagement' do |ds|
      ds.source_files = 'SampleMessengerCocoapodFramework/Code/DataManagement.h', 'SampleMessengerCocoapodFramework/Code/DataManagement/**/*'
        ds.resources = [ 'SampleMessengerCocoapodFramework/Code/DataManagement/Model/Model.xcdatamodeld', 'SampleMessengerCocoapodFramework/Code/DataManagement/Model/Model.xcdatamodeld/*.xcdatamodel' ]
        ds.preserve_paths = 'SampleMessengerCocoapodFramework/Code/DataManagement/Model/Model.xcdatamodeld'
      end
  
      s.subspec 'Networking' do |ns|
      ns.source_files = 'SampleMessengerCocoapodFramework/Code/Networking.h', 'SampleMessengerCocoapodFramework/Code/Networking/**/*.{h,m,swift}'
      end
  
      # s.resource_bundles = {
      #   'SampleMessengerCocoapodFramework' =&gt; ['SampleMessengerCocoapodFramework/Assets/*.png']
      # }
  
      # s.public_header_files = 'Pod/Classes/**/*.h'
      # s.frameworks = 'UIKit', 'MapKit'
      # s.dependency 'AFNetworking', '~&gt; 2.3'
  end
  </code></pre>
  
  <p>I've tried to ask the <a href="https://github.com/CocoaPods/CocoaPods/issues/6973" rel="noreferrer">question</a> in Cocoapods, but was referred here</p>
  
  <p>Any help would be appreciated!</p>