mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b78d7051e5
Summary: As a part of the "Lean Core" effort we are moving many React Native open source modules into React Native. Through this task, we reduced the app size of all React Native applications! For this task, I moved the ART iOS files to Facebook internal. Changelog: [iOS][Changed] - Moved ART iOS files from React Native to Facebook internal Reviewed By: PeteTheHeat Differential Revision: D22560856 fbshipit-source-id: 4ed982b0361fef3e875374b6c3df0204037c2bfa
70 lines
1.9 KiB
Ruby
70 lines
1.9 KiB
Ruby
require_relative '../scripts/react_native_pods'
|
|
|
|
source 'https://cdn.cocoapods.org/'
|
|
platform :ios, '10.0'
|
|
|
|
if ENV['USE_FRAMEWORKS'] == '1'
|
|
puts "Installing pods with use_frameworks!"
|
|
use_frameworks!
|
|
end
|
|
|
|
def pods()
|
|
project 'RNTesterPods.xcodeproj'
|
|
|
|
# Enable TurboModule
|
|
use_react_native!(path: "..")
|
|
pod 'ReactCommon/turbomodule/samples', :path => '../ReactCommon'
|
|
|
|
# Additional Pods which aren't included in the default Podfile
|
|
pod 'React-RCTPushNotification', :path => '../Libraries/PushNotificationIOS'
|
|
pod 'Yoga',:path => '../ReactCommon/yoga', :modular_headers => true
|
|
# Additional Pods which are classed as unstable
|
|
#
|
|
# To use fabric: add `fabric_enabled` option to the use_react_native method above, like below
|
|
# use_react_native!(path: "..", fabric_enabled: true)
|
|
end
|
|
|
|
target 'RNTester' do
|
|
pods()
|
|
use_flipper!
|
|
end
|
|
|
|
target 'RNTesterUnitTests' do
|
|
pods()
|
|
pod 'React-RCTTest', :path => "./RCTTest"
|
|
end
|
|
|
|
target 'RNTesterIntegrationTests' do
|
|
pods()
|
|
pod 'React-RCTTest', :path => "./RCTTest"
|
|
end
|
|
|
|
def frameworks_pre_install(installer)
|
|
static_frameworks = ['FlipperKit', 'Flipper', 'Flipper-Folly',
|
|
'CocoaAsyncSocket', 'ComponentKit', 'Flipper-DoubleConversion',
|
|
'Flipper-Glog', 'Flipper-PeerTalk', 'Flipper-RSocket',
|
|
'CocoaLibEvent', 'OpenSSL-Universal', 'boost-for-react-native']
|
|
|
|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
|
|
installer.pod_targets.each do |pod|
|
|
if static_frameworks.include?(pod.name)
|
|
def pod.build_type
|
|
Pod::Target::BuildType.static_library
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
def codegen_pre_install(installer)
|
|
system("../scripts/generate-native-modules-specs.sh")
|
|
end
|
|
|
|
pre_install do |installer|
|
|
frameworks_pre_install(installer) if ENV['USE_FRAMEWORKS'] == '1'
|
|
codegen_pre_install(installer) if ENV['USE_CODEGEN'] == '1'
|
|
end
|
|
|
|
post_install do |installer|
|
|
flipper_post_install(installer)
|
|
end
|