Help us understand the problem. What is going on with this article?

[CocoaPods] Podspec ファイルの一例

More than 5 years have passed since last update.

やりたいこと

  • spec.name を参照したい
  • ViewController.mなど、プロジェクトのデフォルトファイルは除外したい
  • pchファイルに書いたimportを参照したい
Example.podspec
Pod::Spec.new do |spec|
spec.name         = 'Example'
spec.source_files = "#{spec.name}/*.{h,m}"
spec.exclude_files = "#{spec.name}/AppDelegate.{h,m}", "#{spec.name}/RootViewController.{h,m}", "#{spec.name}/ViewController.{h,m}", "#{spec.name}/main.m"
spec.prefix_header_contents = '#import "CommonHeader.h"'

spec.subspec 'UIView+Sizes' do |a|
    a.source_files = "#{spec.name}/UIView+Sizes.{h,m}"
end

end
plusadd
Piascore 株式会社代表 / 音楽、テクノロジー、ベンチャー経営 / スマート電子楽譜 Piascore /アマチュアピアノ弾き。
https://medium.com/@plusadd
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away