Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rizumita opened this issue Dec 6, 2019 · 0 comments
Open

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

rizumita opened this issue Dec 6, 2019 · 0 comments

Comments

@rizumita
Copy link

rizumita commented Dec 6, 2019

おそらく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
@rizumita rizumita changed the title CocoaPodsで CocoaPodsでインストールするとビルでに失敗する Dec 6, 2019
@rizumita rizumita changed the title CocoaPodsでインストールするとビルでに失敗する CocoaPodsでインストールするとビルドに失敗する Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant