Xcode, cocoapods + nib file, s.resources = ['*. {Xib} '] do not work

I have one problem. I created a simple project and as a result I have the following files: ViewController.h, ViewController.m, ViewController.xib, ViewController.podspec and LICENSE.

Structure of ViewController.podspec:
Pod:: Spec.new do |s|
  s.name             = "ViewController"
  s.version          = "0.1.0"
  s.summary          = "Some text"
  s.homepage         = "setmypage"
  s.license          = 'MIT'
  s.author           = { "Oleksii" => "oleksii@site.com" }
  s.source           = { :path => "." }
  s.platform     = :ios
  s.requires_arc = true
  s.source_files = '*.{h,m,xib}'
  s.resources = ['*.{xib}']

end

I created a simple new project and added a folder with Pod.

after i made pib lib lint for my pod and do pod install this pod.

Structure Podfile:
platform :ios
pod "ViewController", :path => "testPod/"
    pod 'ViewController'

Ok I had a project with my Under. But when I tried to build my project, I got Unable to run the StripNIB ViewController.nib command - this goal may include its own product.

What should I do?

+4
source share
2 answers

. xib source_files podspecs:

 s.source_files = '*.{h,m,xib}'
 s.resources = ['*.{xib}']

podspecs , cocoapod 0.39 , , xib (resource_bundle):

 s.source_files = 'Pod/Classes/**/*.{h,m}'
 s.resource_bundles = {
     'MyPodBundle' => ['Pod/Classes/**/*.xib']
 }

, xib source_files

+4

. xcode , Build Phases Dependencies list .

Bundle Resources Link Binary with Libraries, .

+1

All Articles