Podfile
2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use_frameworks!
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
# 开源联盟宿主的小程序podspec私有库源(在gitee小程序下的私有仓库,宿主可将依赖源同步到自己公司下私有仓库中)
source 'https://gitee.com/baidu/swan-ios-specs.git'
source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git'
platform :ios, '10.0'
# 忽略引入库的所有警告
inhibit_all_warnings!
install! 'cocoapods',
:deterministic_uuids => false,
:disable_input_output_paths => true # 避免Assets.car资源拷贝,引起[CP] Copy Pods Resources编译失败
target 'CNLiveBBASMModule_Example' do
pod 'CNLiveBBASMModule', :path => '../'
pod 'CNLiveNewTripartiteManagement/lottie-ios'
pod 'CNLiveNewTripartiteManagement/MJExtension'
pod 'CNLiveShareToolKit'
pod 'CNLiveTencentopenapi'
pod 'MBProgressHUD'
#依赖三方私有库,如果里面有.a的时候加上这个
pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
target 'CNLiveBBASMModule_Tests' do
inherit! :search_paths
end
end
# 描述表收集脚本,如果期望每次pod install都自动收集描述表,则添加如下代码
post_install do |installer|
root_path = File.dirname(__FILE__)
# 其中'/Resources/SwanResource'为描述表要输出的目录,宿主可以指定自己的目录
scheme_desc_path = "#{root_path}/Resources"
unless File::exist?(scheme_desc_path) then
puts "⚠️ 描述表保存路径 scheme_desc_path 不正确,请在Podfile中修正 ⚠️"
else
# 在末尾加 --diff 参数, 可以在更新描述表并时输出 diff 文件
output = `python Script/scheme_desc_collector.py #{root_path} #{scheme_desc_path}`
if $?.to_i != 0
puts "⚠️ 收集端能力描述表失败:⚠️\n#{output}"
else
puts "-------收集端能力描述表成功!-------"
puts "保存在目录:#{scheme_desc_path}"
end
end
end