CocoaPods podspec一些常见用法备忘

spec用法

是否需要ARC,默认是true

requires_arc

定义和pod名字不同的文件头起点

header_dir

The directory where to store the headers files so they don't break includes.

保持头文件的层次结构

header_mappings_dir

A directory from where to preserve the folder structure for the headers files. If not provided the headers files are flattened.

source_files可以用数组,有多种匹配模式

File patterns

关闭告警

通过pod_target_xcconfig设置,可以用两种不同的设置方法实现

  1. 在这个key: WARNING_CFLAGS对应的value里写-Wno-xxxxx
  2. 找到具体warning的名字,写成Key-value的方式
  s.pod_target_xcconfig = {
    'CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF' => 'NO',
    'CLANG_WARN_UNGUARDED_AVAILABILITY' => 'NO',
    'CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS' => 'NO'
  }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容