Update RN and Viro. iOS build working
This commit is contained in:
@@ -23,7 +23,7 @@ target 'DeightonAR' do
|
||||
|
||||
# Third party deps podspec link
|
||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||
pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
|
||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
pod 'react-native-maps', path: '../node_modules/react-native-maps'
|
||||
@@ -37,22 +37,61 @@ target 'DeightonAR' do
|
||||
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
|
||||
end
|
||||
|
||||
pre_install do |installer|
|
||||
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
|
||||
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
|
||||
# See https://gist.github.com/Jpunt/3fe75effd54a702034b75ff697e47578
|
||||
#
|
||||
# When using RN in combination with Cocoapods, a lot of
|
||||
# things are broken. These are the fixes we had to append
|
||||
# to our Podfile when upgrading to ReactNative@0.55.3.
|
||||
#
|
||||
# WARNING: Check those line numbers when you're on a different version!
|
||||
|
||||
def change_lines_in_file(file_path, &change)
|
||||
print "Fixing #{file_path}...\n"
|
||||
|
||||
contents = []
|
||||
|
||||
file = File.open(file_path, 'r')
|
||||
file.each_line do | line |
|
||||
contents << line
|
||||
end
|
||||
file.close
|
||||
|
||||
File.open(file_path, 'w') do |f|
|
||||
f.puts(change.call(contents))
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
if target.name == 'yoga'
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
|
||||
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
|
||||
end
|
||||
elsif target.name == 'react-native-google-maps'
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['CLANG_ENABLE_MODULES'] = 'NO'
|
||||
end
|
||||
# https://github.com/facebook/yoga/issues/711#issuecomment-381098373
|
||||
change_lines_in_file('./Pods/Target Support Files/yoga/yoga-umbrella.h') do |lines|
|
||||
lines.reject do | line |
|
||||
[
|
||||
'#import "Utils.h"',
|
||||
'#import "YGLayout.h"',
|
||||
'#import "YGNode.h"',
|
||||
'#import "YGNodePrint.h"',
|
||||
'#import "YGStyle.h"',
|
||||
'#import "Yoga-internal.h"',
|
||||
].include?(line.strip)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# https://github.com/facebook/yoga/issues/711#issuecomment-374605785
|
||||
change_lines_in_file('../node_modules/react-native/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h') do |lines|
|
||||
unless lines[27].include?("#ifdef __cplusplus")
|
||||
lines.insert(27, "#ifdef __cplusplus")
|
||||
lines.insert(34, "#endif")
|
||||
end
|
||||
lines
|
||||
end
|
||||
|
||||
# https://github.com/facebook/react-native/issues/13198
|
||||
change_lines_in_file('../node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h') do |lines|
|
||||
lines.map { |line| line.include?("#import <RCTAnimation/RCTValueAnimatedNode.h>") ? '#import "RCTValueAnimatedNode.h"' : line }
|
||||
end
|
||||
|
||||
# https://github.com/facebook/react-native/issues/16039
|
||||
change_lines_in_file('../node_modules/react-native/Libraries/WebSocket/RCTReconnectingWebSocket.m') do |lines|
|
||||
lines.map { |line| line.include?("#import <fishhook/fishhook.h>") ? '#import "fishhook.h"' : line }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user