makomori / Sharaku

(Not maintained)Image filtering UI library like Instagram.
MIT License
1.51k stars 151 forks source link

CocoaPodsでインストールするとビルドに失敗する #17

Open rizumita opened 4 years ago

rizumita commented 4 years ago

おそらくpodspecファイルで

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

と指定しているためxibファイルがコンパイル対象として認識されていて、xibをコンパイルしようとしてエラーになります。 手元のプロジェクトでは以下のように回避していますが、podspecの修正をしていただけるとありがたいです。

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'Sharaku'
      source_files = target.source_build_phase.files
      selected = source_files.select do |file|
        file.file_ref.name.to_s.include? 'xib'
      end
      selected.each do |file|
        source_files.delete file
        puts "Deleting source file #{file.inspect} from target #{target.inspect}."
      end
    end
  end
end