Skip to content

Commit

Permalink
Use autolink script in template on iOS (#27984)
Browse files Browse the repository at this point in the history
Summary:
We use this for RN tester but it is not currently included in npm releases. It cleans up the podfile a lot and will make adding / removing pods easier in the future since it won't require users to update their project.

## Changelog

[iOS] [Added] - Use autolink script in template on iOS
Pull Request resolved: #27984

Test Plan: Not sure if there is a way to end to end test this but I've been using this autolink script in my fork for a while.

Differential Revision: D19787729

Pulled By: cpojer

fbshipit-source-id: b843ea723085830f13e8f0149833d1beb1efdfac
  • Loading branch information
janicduplessis authored and facebook-github-bot committed Feb 7, 2020
1 parent cd194b8 commit a35efb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"ReactCommon",
"README.md",
"rn-get-polyfills.js",
"scripts/autolink-ios.rb",
"scripts/compose-source-maps.js",
"scripts/ios-configure-glog.sh",
"scripts/launchPackager.bat",
Expand Down
2 changes: 1 addition & 1 deletion scripts/autolink-ios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def use_react_native! (options={})
pod 'React-jsinspector', :path => "#{prefix}/ReactCommon/jsinspector"
pod 'ReactCommon/callinvoker', :path => "#{prefix}/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon"
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga"
pod 'Yoga', :path => "#{prefix}/ReactCommon/yoga", :modular_headers => true

pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec"
Expand Down
32 changes: 2 additions & 30 deletions template/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
platform :ios, '10.0'
require_relative '../node_modules/react-native/scripts/autolink-ios'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

# Add Flipper Pods
Expand Down Expand Up @@ -39,36 +40,7 @@ end

target 'HelloWorld' do
# Pods for HelloWorld
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'

pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true

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 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_react_native!

target 'HelloWorldTests' do
inherit! :complete
Expand Down

0 comments on commit a35efb9

Please sign in to comment.