-
Notifications
You must be signed in to change notification settings - Fork 9
/
Podfile
157 lines (124 loc) · 3.99 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'
use_frameworks!
def common_pods
# Networking
pod 'Alamofire'
pod 'atlantis-proxyman', :configurations => ['Debug']
pod 'SDWebImage'
pod 'Kingfisher'
# Social
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'GoogleSignIn'
pod 'GoogleAPIClientForREST/Drive'
pod 'SwiftyDropbox'
pod 'Firebase'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Messaging'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
# Data
pod 'ObjectMapper'
pod 'SwiftyXMLParser'
pod 'SwiftyJSON'
# UI
pod 'SkyFloatingLabelTextField', :git => 'https://github.com/Skyscanner/SkyFloatingLabelTextField.git'
pod 'MBProgressHUD'
pod 'MediaBrowser', :git => 'https://github.com/ayuzhin/MediaBrowser.git'
pod 'SwiftRater'
pod 'Siren'
pod 'WhatsNewKit'
pod 'PhoneNumberKit'
pod 'SwiftMessages'
pod 'ReCaptcha', :git => 'https://github.com/fjcaetano/ReCaptcha.git'
pod "WSTagsField", :git => 'https://github.com/ayuzhin/WSTagsField.git'
# Utils
pod 'FilesProvider', :git => 'https://github.com/ayuzhin/FileProvider.git', :commit => 'dac57676f5f5297f6a78a321bd9e4b6d3f892a39'
pod 'FileKit'
pod 'IQKeyboardManagerSwift'
pod 'KeychainSwift'
pod 'SwiftGen'
pod 'SwiftFormat/CLI', :configurations => ['Debug']
end
class ::Pod::Generator::Acknowledgements
def footnote_title
""
end
def footnote_text
""
end
end
target 'Documents-opensource' do
workspace 'ONLYOFFICE-Documents-opensource'
project 'Documents/Documents-opensource.xcodeproj'
common_pods
end
target 'Documents' do
workspace 'ONLYOFFICE-Documents'
project 'Documents/Documents.xcodeproj'
common_pods
target 'DocumentsTests' do
inherit! :complete
inherit! :search_paths
end
end
target 'Documents-develop' do
workspace 'ONLYOFFICE-Documents-develop'
project 'Documents/Documents-develop.xcodeproj'
common_pods
end
def fix_xcworkspaces
puts "Fix xcworkspaces"
template = File.open("scripts/xcworkspace.template").read()
project_names = [
"Documents",
"Documents-opensource",
"Documents-develop"
]
for project_name in project_names do
begin
file = File.open("ONLYOFFICE-#{project_name}.xcworkspace/contents.xcworkspacedata", "w")
file.write(template % { :project => "Documents/#{project_name}.xcodeproj" } )
rescue IOError => e
#some error occur, dir not writable etc.
ensure
file.close unless file.nil?
end
end
end
post_install do | installer |
require 'fileutils'
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
config.build_settings['ENABLE_BITCODE'] = 'NO'
target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'
target.build_configurations.each do |build_configuration|
if target_is_resource_bundle
build_configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
build_configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
build_configuration.build_settings['CODE_SIGNING_IDENTITY'] = '-'
build_configuration.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-'
end
end
end
end
end
post_integrate do |installer|
fix_xcworkspaces
end