简介
pofile是一个Ruby文件,也可以使用json文件(podfile.json)
podfile hook
添加build_settings
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||=['$(inherited)','LOG_ENABLED=1']
end
end
这样做可以为修改PREPROCESSOR
,添加想要的预编译宏,例如打印日志的宏
预编译宏添加.png
模拟器arm64
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
# 添加arm64架构
if config.name == 'Release' then
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
不用每次打静态库都去添加arm64
了