Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fetch_remote_framework_for_target
def fetch_remote_framework_for_target(target)
existed_remote_framework = self.remote_framework_names.include?(zip_framework_name(target))
return false unless existed_remote_framework
begin
zip_framework_path = self.ftp.get(remote_framework_dir + zip_framework_name(target))
rescue
Pod::UI.puts "Retry fetch remote fameworks"
self.reset_ftp
zip_framework_path = self.ftp.get(remote_framework_dir + zip_framework_name(target))
end
return false unless File.exist?(zip_framework_path)
target_framework_path = generate_framework_path + target.name
return true unless Dir.empty?(target_framework_path)
extract_framework_path = generate_framework_path + target.name
zf = Zipper.new(zip_framework_path, extract_framework_path)
zf.extract()
true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.