Module: Pod::Podfile::DSL

Defined in:
lib/cocoapods-aqarahome/command/Podfile_Dev.rb

Instance Method Summary collapse

Instance Method Details

#code_signing_allow_no!Object



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/cocoapods-aqarahome/command/Podfile_Dev.rb', line 44

def code_signing_allow_no!
  post_install do |installer|
    installer.pods_project.targets.each do |target|
      if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
        target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
        end
      end
    end
  end
end

#dev_pods(pods, git_pull = false, branch = 'aqara') ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/cocoapods-aqarahome/command/Podfile_Dev.rb', line 7

def dev_pods(pods, git_pull = false, branch = 'aqara')
  if branch.length > 0
    if git_pull
      pull_local_sdk_origin_source(pods)
    elsif
      pull_latest_code_and_resolve_conflict(pods)
      podStr = pods.join(", ")
      puts "成功清除私有库".green + "#{podStr}".yellow + "的缓存数据".green
      pods.each do |pod|
        args = ['clean',pod, "--all"]
        Pod::Command::Cache.run(args)
      end
    end
    # pods.each do |name|
    #   pod name, :git => "https://xyz.com/ios/#{name}.git", :branch => "#{branch}"
    # end

    # puts "lebbay: using remote pods with branch: #{branch}".green
  else
    # 自定义开发目录
    development_path = Config.instance.dev_pods_path
    pods.each do |name|
      pod name, :path => "#{development_path}#{name}"
    end
    puts "lebbay: using local pods with path: #{development_path}xxx".green
  end
end

#watch_upObject



35
36
37
38
39
40
41
42
# File 'lib/cocoapods-aqarahome/command/Podfile_Dev.rb', line 35

def watch_up
  puts '|========================================================================|'.red
  (0..10).each do |i|
    puts '|                                                                        |'.red unless i == 5
    puts '|                       '.red + '你小子注意更新私有库SDK'.green + '                          |'.red unless i != 5
  end
  puts '|========================================================================|'.red
end