-
Notifications
You must be signed in to change notification settings - Fork 36
/
Podfile
61 lines (53 loc) · 2.03 KB
/
Podfile
1
2
3
4
5
6
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
DEPLOYMENT_TARGET_MACOS = '10.15'
platform :macos, DEPLOYMENT_TARGET_MACOS
use_frameworks!
target 'cTiVo' do
pod 'AppCenter/Analytics'
pod 'Firebase/Crashlytics'
pod 'CocoaLumberjack/Swift'
target 'cTiVoTests' do
inherit! :search_paths
end
end
target 'cTiVo MAS' do
pod 'AppCenter/Analytics'
pod 'Firebase/Crashlytics'
pod 'CocoaLumberjack/Swift'
end
post_install do |installer|
puts 'Patching DDLog.m to fix RegisteredClasses bug, if needed.'
filename = "Pods/CocoaLumberjack/Sources/CocoaLumberjack/DDLog.m"
outStr = %x(patch --forward #{filename} < DDlogPatch.patch)
errStr = <<"EOS" #if patch gives this exact error message, don't alarm user
patching file '#{filename}'
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to '#{filename}.rej'
EOS
if outStr == errStr
puts ("Patch already applied")
%x{ rm -f #{filename}.rej } #remove "rejected patch" file if created
else
puts outStr
end
installer.pods_project.build_configurations.each do |config|
config.build_settings['DEAD_CODE_STRIPPING'] = 'YES'
end
# Fix deployment target for pods that don't specify one
# or specify one that is older than our own deployment target.
desired_macos = Gem::Version.new(DEPLOYMENT_TARGET_MACOS)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'ARCHS'
settings = config.build_settings
actual = Gem::Version.new(settings['MACOSX_DEPLOYMENT_TARGET'])
if actual < desired_macos
settings['MACOSX_DEPLOYMENT_TARGET'] = DEPLOYMENT_TARGET_MACOS
end
#patch for Xcode 15 until cocoapods 1.13 released
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end