module Pod class Podfile class TargetDefinition def detect_prebuilt_pod(name, requirements) options = requirements.last || {} # prebuild @explicit_prebuild_pod_names ||= [] @reject_prebuild_pod_names ||= [] if options.is_a?(Hash) && options.include?(:binary) @explicit_prebuild_pod_names << Specification.root_name(name) if options[:binary] @reject_prebuild_pod_names << Specification.root_name(name) unless options[:binary] else settings = Jxedt.config.binary_settings symbol_name = Specification.root_name(name).to_sym if settings.include?(symbol_name) && [true, false].include?(settings[symbol_name]) @explicit_prebuild_pod_names << Specification.root_name(name) if settings[symbol_name] @reject_prebuild_pod_names << Specification.root_name(name) unless settings[symbol_name] end end # header search path @explicit_header_search_pod_names ||= [] @reject_header_search_pod_names ||= [] @explicit_header_search_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options[:framework_header_search] @reject_header_search_pod_names << Specification.root_name(name) if options.is_a?(Hash) && options.include?(:framework_header_search) && !options[:framework_header_search] options.delete(:binary) if options.is_a?(Hash) options.delete(:framework_header_search) if options.is_a?(Hash) requirements.pop if options.empty? end # ---- patch method ---- # We want modify `store_pod` method, but it's hard to insert a line in the # implementation. So we patch a method called in `store_pod`. original_parse_inhibit_warnings = instance_method(:parse_inhibit_warnings) define_method(:parse_inhibit_warnings) do |name, requirements| detect_prebuilt_pod(name, requirements) original_parse_inhibit_warnings.bind(self).call(name, requirements) end end end end