Encountered an unknown error (Unable to find other source ref for `contents` for target `MyDemo`.) during validation

Viewed 483

i got an error when i run the command

pod lib lint
ERROR | [iOS] unknown: Encountered an unknown error (Unable to find other source ref for `contents` for target `MyDemo`.) during validation.

i used coreData inside my project.
CoreData.xcdatamodeld file is store at /MyDemo/Classes/CoreData.xcdatamodeld

below is my podspec file.

file path of coredata. /MyDemo/Classes/CoreData.xcdatamodeld

please help me

Pod::Spec.new do |s|
  s.name             = 'MyDemo'
  s.version          = '0.1.0'
  s.summary          = 'A short description of MyDemo'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://github.com/myurl'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'myself' => 'myid@gmail.com' }
  s.source           = { :git => 'https://github.com/myurl.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '10.0'

  s.source_files = 'MyDemo/Classes/**/*'

  # s.resource_bundles = {
  #   'MyDemo' => ['MyDemo/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end
1 Answers

Modify pod spec source file as below:

s.source_files = 'MyDemo/**/*.{swift, plist}'


s.resources = 'MyDemo/**/*.{storyboard,xib,xcassets,json,png}'

My issue resolved with this fix

Related