-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPodfile
More file actions
55 lines (51 loc) · 1.98 KB
/
Podfile
File metadata and controls
55 lines (51 loc) · 1.98 KB
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
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
example_project_path = 'Examples/Examples'
workspace 'FTMobileSDK.xcworkspace'
project example_project_path
target 'FTMobileSDKUnitTests' do
# Comment the next line if you don't want to use dynamic frameworks
project example_project_path
pod 'OHHTTPStubs','8.0.0'
pod 'KIF','3.8.5'
pod 'Firebase', '8.15.0'
pod 'FirebasePerformance', '8.15.0'
# Pods for SampleApp
end
target 'FTMobileSDKUnitTests-tvOS' do
platform :tvos, '12.0'
# Comment the next line if you don't want to use dynamic frameworks
pod 'OHHTTPStubs','8.0.0'
pod 'Firebase', '8.15.0'
pod 'FirebasePerformance', '8.15.0'
# Pods for SampleApp
end
# Fix the issue of not finding static library libarclite_iphonesimulator.a/libarclite_iphoneos.a
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
end
end
end
installer.pods_project.targets.each do |target|
# Assuming your .xcconfig file is located in the Pods project directory, and the filename is
# Pods-TargetName.debug.xcconfig
# You need to modify this path according to your project structure
xcconfig_path = "Pods/Target Support Files/Pods-FTMobileSDKUnitTests/Pods-FTMobileSDKUnitTests.debug.xcconfig"
# Check if the file exists
if File.exist?(xcconfig_path)
# Read file content
xcconfig_content = File.read(xcconfig_path)
# Use regular expression to replace -ObjC in OTHER_LDFLAGS
new_xcconfig_content = xcconfig_content.gsub(/(OTHER_LDFLAGS\s*=\s*)(.*?)(-ObjC|\s-ObjC\s*)(.*?)/, "\\1\\2\\4")
# Write back to file
File.write(xcconfig_path, new_xcconfig_content)
puts "Updated OTHER_LDFLAGS in #{xcconfig_path}"
else
puts "File #{xcconfig_path} does not exist."
end
end
end