Module: Pod::Podfile::DSL

Defined in:
lib/swordfish/native/podfile.rb,
lib/swordfish/hmap/podfile_dsl.rb

Overview

TREAT_DEVELOPMENTS_AS_NORMAL = ‘treat_developments_as_normal’.freeze

Instance Method Summary collapse

Instance Method Details

#allow_prereleaseObject



16
17
18
# File 'lib/swordfish/native/podfile.rb', line 16

def allow_prerelease
  set_internal_hash_value(ALLOW_PRERELEASE, true)
end

#set_archs_only_arm64Object



12
13
14
# File 'lib/swordfish/native/podfile.rb', line 12

def set_archs_only_arm64
  $archs_only_arm64 = true
end

#set_configuration_env(env = "dev") ⇒ Object

0 dev 1 debug_iphoneos 2 release_iphoneos 需要在podfile_env 先定义 CONFIGURATION_ENV



40
41
42
# File 'lib/swordfish/native/podfile.rb', line 40

def set_configuration_env(env = "dev")
  set_internal_hash_value(CONFIGURATION_ENV, env)
end

#set_hmap_black_pod_list(pods) ⇒ Object



18
19
20
21
22
# File 'lib/swordfish/hmap/podfile_dsl.rb', line 18

def set_hmap_black_pod_list(pods)
  if pods != nil && pods.size() > 0
    $hmap_black_pod_list.concat(pods)
  end
end

#set_hmap_enableObject



14
15
16
# File 'lib/swordfish/hmap/podfile_dsl.rb', line 14

def set_hmap_enable()
  $hmap_enable = true
end

#set_hmap_use_strict_modeObject

if use strict mode, main project can only use ‘#import <PodTargetName/SomeHeader.h>` `#import <SomeHeader.h>` will get ’file not found’ error as well as PodTarget dependent on other PodTarget



26
27
28
# File 'lib/swordfish/hmap/podfile_dsl.rb', line 26

def set_hmap_use_strict_mode
  $strict_mode = true
end

#set_use_source_pods(pods) ⇒ Object



30
31
32
33
34
# File 'lib/swordfish/native/podfile.rb', line 30

def set_use_source_pods(pods)
  hash_pods_use_source = get_internal_hash_value(USE_SOURCE_PODS) || []
  hash_pods_use_source += Array(pods)
  set_internal_hash_value(USE_SOURCE_PODS, hash_pods_use_source)
end

#turn_prebuilt_hmap_off_for_pod_targetsObject

turn off prebuilt hmap for targets in pod project except the ‘main` target



30
31
32
# File 'lib/swordfish/hmap/podfile_dsl.rb', line 30

def turn_prebuilt_hmap_off_for_pod_targets
  $prebuilt_hmap_for_pod_targets = false
end

#use_binaries(flag = true) ⇒ Object



20
21
22
# File 'lib/swordfish/native/podfile.rb', line 20

def use_binaries(flag = true)
  set_internal_hash_value(USE_BINARIES, flag)
end

#use_binaries_with_spec_selector!(&block) ⇒ Object

Raises:

  • (Informative)


24
25
26
27
28
# File 'lib/swordfish/native/podfile.rb', line 24

def use_binaries_with_spec_selector!(&block)
  raise Informative, '必须提供选择需要二进制组件的 block !' unless block_given?

  set_internal_hash_value(USE_BINARIES_SELECTOR, block)
end