Unverified 提交 634edd9a authored 作者: JarvanMo's avatar JarvanMo 提交者: GitHub

🐛 Only append app_id and universal_link for the command when exist (#663)

When no `app_id` was specified in the `pubspec.yaml`, the command will be `ruby path_to_dir/wechat_setup.rb -a -u xxx -p xxx` which the `app_id` will be recognized as `-u`, then inserted to the `Info.plist`. The PR fixes the unexpected behavior.
...@@ -76,7 +76,11 @@ if !universal_link.nil? && !universal_link.empty? ...@@ -76,7 +76,11 @@ if !universal_link.nil? && !universal_link.empty?
Pod::UI.puts "[fluwx] universal_link: #{universal_link}" Pod::UI.puts "[fluwx] universal_link: #{universal_link}"
end end
system("ruby #{current_dir}/wechat_setup.rb #{ignore_security} -a #{app_id} -u #{universal_link} -p #{project_dir} -n Runner.xcodeproj") command = "ruby #{current_dir}/wechat_setup.rb #{ignore_security}"
command += " -p #{project_dir} -n Runner.xcodeproj"
command += " -a #{app_id}" unless app_id.nil? || app_id.empty?
command += " -u #{universal_link}" unless universal_link.nil? || universal_link.empty?
system(command)
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'fluwx' s.name = 'fluwx'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论