Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fabric/Turbo Modules flags to iOS autolinking script #24867

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 2 additions & 8 deletions RNTester/Podfile
Expand Up @@ -7,7 +7,7 @@ target 'RNTester' do
# use_frameworks!

project 'RNTesterPods.xcodeproj'
use_react_native!(path: "..")
use_react_native!(path: "..", turbo_modules_enabled: true)

# Additional Pods which aren't included in the default Podfile
pod 'React-RCTCameraRoll', :path => '../Libraries/CameraRoll'
Expand All @@ -16,13 +16,7 @@ target 'RNTester' do

# Additional Pods which are classed as unstable
#
# Fabric Pods, uncomment these to enable in RNTester
# pod 'React-Fabric', :path => '../ReactCommon'
# pod 'React-graphics', :path => '../ReactCommon/fabric/graphics'
# pod 'React-jsi/Fabric', :path => '../ReactCommon/jsi'
# pod 'React-RCTFabric', :path => '../React'
# pod 'Folly/Fabric', :podspec => '../third-party-podspecs/Folly.podspec'
# To use fabric: add `fabric_enabled` option to the use_react_native method above

pod 'React-turbomodule-core', :path => '../ReactCommon/turbomodule/core'
pod 'React-turbomodule-samples', :path => '../ReactCommon/turbomodule/samples'
end
18 changes: 18 additions & 0 deletions scripts/autolink-ios.rb
Expand Up @@ -2,6 +2,12 @@ def use_react_native! (options={})

# The prefix to the react-native
prefix = options[:path] ||= "../node_modules/react-native"

# Include Fabric dependencies
fabric_enabled = options[:fabric_enabled] ||= false

# Include Turbo Modules dependencies
turbo_modules_enabled = options[:turbo_modules_enabled ||= false

# Include DevSupport dependency
production = options[:production] ||= false
Expand Down Expand Up @@ -35,4 +41,16 @@ def use_react_native! (options={})
pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
pod 'Folly', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec"

if fabric_enabled
pod 'React-Fabric', :path => "#{prefix}/ReactCommon"
pod 'React-graphics', :path => "#{prefix}/ReactCommon/fabric/graphics"
pod 'React-jsi/Fabric', :path => "#{prefix}/ReactCommon/jsi"
pod 'React-RCTFabric', :path => "#{prefix}/React"
pod 'Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec"
end

if turbo_modules_enabled
pod 'React-turbomodule-core', :path => "#{prefix}/ReactCommon/turbomodule/core"
end
end