-
Notifications
You must be signed in to change notification settings - Fork 1
/
Podfile
93 lines (75 loc) · 2.66 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
# Uncomment the next line to define a global platform for your project
# platform :ios, '12.1'
# inhibit_all_warnings!
target 'OceanShare' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for OceanShare
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Mapbox-iOS-SDK'
pod 'GoogleSignIn'
pod 'FBSDKCoreKit', '4.36.0', :inhibit_warnings => true
pod 'FBSDKShareKit', '4.36.0', :inhibit_warnings => true
pod 'FBSDKLoginKit', '4.36.0', :inhibit_warnings => true
pod 'FacebookCore', '0.4', :inhibit_warnings => true
pod 'FacebookLogin', '0.4', :inhibit_warnings => true
pod 'TwitterKit'
pod 'Alamofire', '~> 5.0.0.beta.1'
pod 'JJFloatingActionButton'
pod 'SkeletonView'
pod 'Firebase/Analytics'
pod 'Firebase/Performance'
pod 'Fabric', '~> 1.10.1'
pod 'Crashlytics', '~> 3.13.1'
pod 'SwiftyJSON', '~> 4.0'
pod 'Turf', '~> 0.3'
pod 'Firebase/Functions'
pod 'Stripe'
target 'OceanShareTests' do
inherit! :search_paths
# Pods for testing
pod 'Firebase/Core'
end
target 'OceanShareUITests' do
inherit! :search_paths
# Pods for testing
end
end
PROJECT_ROOT_DIR = File.dirname(File.expand_path(__FILE__))
PODS_DIR = File.join(PROJECT_ROOT_DIR, 'Pods')
PODS_TARGET_SUPPORT_FILES_DIR = File.join(PODS_DIR, 'Target Support Files')
post_install do |installer|
remove_static_framework_duplicate_linkage({'SharedFramework' => ['TwitterCore']})
end
def remove_static_framework_duplicate_linkage(static_framework_pods)
puts "Removing duplicate linkage of static frameworks"
Dir.glob(File.join(PODS_TARGET_SUPPORT_FILES_DIR, "Pods-*")).each do |path|
pod_target = path.split('-', -1).last
static_framework_pods.each do |target, pods|
next if pod_target == target
frameworks = pods.map { |pod| identify_frameworks(pod) }.flatten
Dir.glob(File.join(path, "*.xcconfig")).each do |xcconfig|
lines = File.readlines(xcconfig)
if other_ldflags_index = lines.find_index { |l| l.start_with?('OTHER_LDFLAGS') }
other_ldflags = lines[other_ldflags_index]
frameworks.each do |framework|
other_ldflags.gsub!("-framework \"#{framework}\"", '')
end
File.open(xcconfig, 'w') do |fd|
fd.write(lines.join)
end
end
end
end
end
end
def identify_frameworks(pod)
frameworks = Dir.glob(File.join(PODS_DIR, pod, "**/*.framework")).map { |path| File.basename(path) }
if frameworks.any?
return frameworks.map { |f| f.split('.framework').first }
end
return pod
end