美文网首页面向全栈在项目中踩过的坑
CocoaPods podspec一些常见用法备忘

CocoaPods podspec一些常见用法备忘

作者: 子达如何 | 来源:发表于2019-04-19 08:59 被阅读1次

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'
  }

相关文章

网友评论

    本文标题:CocoaPods podspec一些常见用法备忘

    本文链接:https://www.haomeiwen.com/subject/ivmfgqtx.html