Skip to content

Commit

Permalink
🐛 Only append app_id and universal_link for the command when exist (#663
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
JarvanMo authored Nov 5, 2024
2 parents 842d441 + d54bfb3 commit 634edd9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/fluwx.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ if !universal_link.nil? && !universal_link.empty?
Pod::UI.puts "[fluwx] universal_link: #{universal_link}"
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|
s.name = 'fluwx'
Expand Down

0 comments on commit 634edd9

Please sign in to comment.