This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Podfile
41 lines (32 loc) · 1.39 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
platform :ios, '10.0'
target 'RCTACPAnalytics' do
# inherit! :search_paths
# Pods for testing
react_native_path = "../node_modules/react-native"
pod "React-Core", :path => "#{react_native_path}/React"
pod "React-cxxreact", :path => "#{react_native_path}/ReactCommon/cxxreact"
pod "React-jsi", :path => "#{react_native_path}/ReactCommon/jsi"
pod "React-jsiexecutor", :path => "#{react_native_path}/ReactCommon/jsiexecutor"
pod "React-jsinspector", :path => "#{react_native_path}/ReactCommon/jsinspector"
pod 'DoubleConversion', :podspec => "#{react_native_path}/third-party-podspecs/DoubleConversion.podspec"
pod "yoga", :path => "#{react_native_path}/ReactCommon/yoga"
pod "Folly", :podspec => "#{react_native_path}/third-party-podspecs/Folly.podspec"
pod "ACPAnalytics"
end
post_install do |installer|
## Fix for XCode 12.5 beta
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
end
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end