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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/dongjia_warning_manager.rb', line 7
def self.turn_off_warnings(turn_off, sandbox_root)
return if (turn_off != true)
Dir.foreach(sandbox_root).select{|f| f.end_with?('xcodeproj')}.each do |name|
proj = Xcodeproj::Project.open(File.join(sandbox_root, name))
if name != 'Pods.xcodeproj'
proj.build_configurations.each do | config |
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "8.0"
end
end
end
proj.targets.each do | target |
next if target.name.start_with?('Pods')
target.build_configurations.each do | config |
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES" unless target.name.start_with?('DJ')
config.build_settings['CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF'] = "NO"
config.build_settings['GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS'] = "NO"
config.build_settings['ENABLE_STRICT_OBJC_MSGSEND'] = "NO"
config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = "NO"
config.build_settings['CLANG_WARN_STRICT_PROTOTYPES'] = "NO"
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "8.0"
end
config.build_settings['ENABLE_BITCODE'] = "NO"
end
end
proj.save
end
end
|