Class: Pod::Podfile::TargetDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-binary/helper/podfile_options.rb

Instance Method Summary collapse

Instance Method Details

#parse_prebuild_framework(name, requirements) ⇒ Object

— option for setting using prebuild framework —



13
14
15
16
17
18
19
20
21
# File 'lib/cocoapods-binary/helper/podfile_options.rb', line 13

def parse_prebuild_framework(name, requirements)
    options = requirements.last
    return requirements unless options.is_a?(Hash)
    
    should_prebuild_framework = options.delete(Pod::Prebuild.keyword)
    pod_name = Specification.root_name(name)
    set_prebuild_for_pod(pod_name, should_prebuild_framework)
    requirements.pop if options.empty?
end

#prebuild_framework_namesObject



37
38
39
40
41
42
43
# File 'lib/cocoapods-binary/helper/podfile_options.rb', line 37

def prebuild_framework_names
    names = @prebuild_framework_names || []
    if parent != nil and parent.kind_of? TargetDefinition
        names += parent.prebuild_framework_names
    end
    names
end

#set_prebuild_for_pod(pod_name, should_prebuild) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cocoapods-binary/helper/podfile_options.rb', line 23

def set_prebuild_for_pod(pod_name, should_prebuild)
    
    if should_prebuild == true
        # watchos isn't supported currently
        return if self.platform == :watchos

        @prebuild_framework_names ||= []
        @prebuild_framework_names.push pod_name
    else
        @should_not_prebuild_framework_names ||= []
        @should_not_prebuild_framework_names.push pod_name
    end
end

#should_not_prebuild_framework_namesObject



44
45
46
47
48
49
50
# File 'lib/cocoapods-binary/helper/podfile_options.rb', line 44

def should_not_prebuild_framework_names
    names = @should_not_prebuild_framework_names || []
    if parent != nil and parent.kind_of? TargetDefinition
        names += parent.should_not_prebuild_framework_names
    end
    names
end