react-native-macos/packages/rn-tester/Podfile

64 строки
1.5 KiB
Plaintext
Исходник Обычный вид История

require_relative '../../scripts/react_native_pods'
source 'https://cdn.cocoapods.org/'
platform :ios, '10.0'
USE_FRAMEWORKS = ENV['USE_FRAMEWORKS'] == '1'
if USE_FRAMEWORKS
puts "Installing pods with use_frameworks!"
use_frameworks!
end
feat: Enable Hermes to work on iOS (#29914) Summary: This PR makes it possible to build iOS applications with Hermes. Note that it doesn't work with `use_frameworks!` just yet. Fixes https://github.com/facebook/react-native/issues/27845 (by downgrading iOS deployment target for RCT-Folly to 9.0) Fixes https://github.com/facebook/react-native/issues/28810 (as above) Checklist: - [x] Adjust release scripts to create Hermes bytecode bundle - [x] Release new Hermes npm package that includes iOS files (unreleased right now, if you want to try locally, you have to clone Hermes and `yarn link` its master to this project) - [x] Test on a new React Native application in both Debug and Release (Device) - [x] Test on an RNTester application in both Debug and Release (Device) - [x] Add missing `i386` to Hermes framework and enable Bitcode - [x] Inspect CI failures for possible regressions - [x] Resolve Folly issue as reported https://github.com/facebook/react-native/issues/27845 and https://github.com/facebook/react-native/issues/28810 - [x] Release new Hermes and test against it that everything works ## Changelog [IOS] [FEATURE] - Enable Hermes on iOS [INTERNAL] - Upgrade to CocoaPods 1.10.0 to resolve Xcode 12.0 issues [INTERNAL] - Upgrade to Xcode 12.0 on the CircleCI [INTERNAL] - Fix building RNTester in Release mode [INTERNAL] - Fix build-time errors of `libevent` with `use_frameworks!` [INTERNAL] - Introduce `USE_HERMES` variable and test all RNTester configurations on the CI [INTERNAL] - Do not fetch CocoaPods repository since we're using CDN anyway Pull Request resolved: https://github.com/facebook/react-native/pull/29914 Test Plan: Turn on `hermes_enabled` to true in your `Podfile`, install pods, and run the iOS application. Your app should be running Hermes now. Preview: (note "Engine: Hermes") <img width="395" alt="Screenshot 2020-09-09 at 19 22 32" src="https://user-images.githubusercontent.com/2464966/92631584-d7c01d80-f2d1-11ea-9b40-33d73db96a53.png"> Reviewed By: hramos Differential Revision: D24684845 Pulled By: cpojer fbshipit-source-id: 900cbe3bf9398a6fd4a773d552899a001bf5146b
2020-11-03 12:13:01 +03:00
if ENV['USE_HERMES'] == '1'
puts "Using Hermes engine"
end
def pods()
project 'RNTesterPods.xcodeproj'
Update iOS Fabric-related files to compile on OSS (#29810) Summary: Original PR contents: This pull request updates the Podspecs and associated build scripts, and some source files so they build on OSS. RNTester now compiles with `fabric_enabled` again. The following changes have been made: * Various spots that were pointing to the old `ReactCommon/fabric` location have now been updated to `ReactCommon/react/renderer` * Files that were attempting to use internal FB header `FBRCTFabricComponentsPlugins.h` were changed to use `RCTFabricComponentsPlugins.h` * `RCTFabricComponentsPlugins` in OSS was updated to include the `Image` fabric component (thanks tsapeta) * Replaced old `generate-rncore.sh` build script with new `generate-rncore.js` script which does not require `flow-node` and uses the `react-native-codegen` API directly, so there is no longer any need for an interim `schema-rncore.json` file. * Updated Yoga podspec which wasn't fully synced with changes from the main Yoga repo * Updated Fabric podspec with additional needed subspecs Additions to PR by hramos: * Replaced use of generate-rncore scripts with the original generate-native-modules-specs.sh script, which is now generate-specs.sh and supports both codegen for Native Modules and Components now (TurboModules/Fabric). * Codegen now runs at build time as part of the Xcode build pipeline instead of as part of `pod install`. The build script is injected by the FBReactNativeSpec pod, as the pod is part of both Fabric and non-Fabric builds. ## Changelog [General] [Fixed] - RNTester compiles with `fabric_enabled` again Pull Request resolved: https://github.com/facebook/react-native/pull/29810 Test Plan: RNTester now compiles and runs in the simulator again when `fabric_enabled` is set to `true`. ``` cd xplat/js/react-native-github/packages/rn-tester USE_FABRIC=1 pod install open RNTesterPods.xcworkspace # Build and run ``` Reviewed By: fkgozali Differential Revision: D24058507 Pulled By: hramos fbshipit-source-id: 8b2ea3694e6cb9aa23f83f087e2995fd4320e2bb
2020-12-22 19:33:56 +03:00
fabric_enabled = false
# To use fabric: set the environment variable `USE_FABRIC` to 1, like below
# $ USE_FABRIC=1 bundle exec pod install
# or
# $ export USE_FABRIC=1
# $ bundle exec pod install
if ENV['USE_FABRIC'] == '1'
puts "Building RNTester with Fabric enabled."
fabric_enabled = true
end
prefix_path = "../.."
Update iOS Fabric-related files to compile on OSS (#29810) Summary: Original PR contents: This pull request updates the Podspecs and associated build scripts, and some source files so they build on OSS. RNTester now compiles with `fabric_enabled` again. The following changes have been made: * Various spots that were pointing to the old `ReactCommon/fabric` location have now been updated to `ReactCommon/react/renderer` * Files that were attempting to use internal FB header `FBRCTFabricComponentsPlugins.h` were changed to use `RCTFabricComponentsPlugins.h` * `RCTFabricComponentsPlugins` in OSS was updated to include the `Image` fabric component (thanks tsapeta) * Replaced old `generate-rncore.sh` build script with new `generate-rncore.js` script which does not require `flow-node` and uses the `react-native-codegen` API directly, so there is no longer any need for an interim `schema-rncore.json` file. * Updated Yoga podspec which wasn't fully synced with changes from the main Yoga repo * Updated Fabric podspec with additional needed subspecs Additions to PR by hramos: * Replaced use of generate-rncore scripts with the original generate-native-modules-specs.sh script, which is now generate-specs.sh and supports both codegen for Native Modules and Components now (TurboModules/Fabric). * Codegen now runs at build time as part of the Xcode build pipeline instead of as part of `pod install`. The build script is injected by the FBReactNativeSpec pod, as the pod is part of both Fabric and non-Fabric builds. ## Changelog [General] [Fixed] - RNTester compiles with `fabric_enabled` again Pull Request resolved: https://github.com/facebook/react-native/pull/29810 Test Plan: RNTester now compiles and runs in the simulator again when `fabric_enabled` is set to `true`. ``` cd xplat/js/react-native-github/packages/rn-tester USE_FABRIC=1 pod install open RNTesterPods.xcworkspace # Build and run ``` Reviewed By: fkgozali Differential Revision: D24058507 Pulled By: hramos fbshipit-source-id: 8b2ea3694e6cb9aa23f83f087e2995fd4320e2bb
2020-12-22 19:33:56 +03:00
use_react_native!(path: prefix_path, fabric_enabled: fabric_enabled, hermes_enabled: ENV['USE_HERMES'] == '1')
pod 'ReactCommon/turbomodule/samples', :path => "#{prefix_path}/ReactCommon"
# Additional Pods which aren't included in the default Podfile
pod 'React-RCTPushNotification', :path => "#{prefix_path}/Libraries/PushNotificationIOS"
pod 'Yoga', :path => "#{prefix_path}/ReactCommon/yoga", :modular_headers => true
# Additional Pods which are classed as unstable
end
target 'RNTester' do
pods()
if !USE_FRAMEWORKS
use_flipper!
end
end
target 'RNTesterUnitTests' do
pods()
pod 'React-RCTTest', :path => "./RCTTest"
end
target 'RNTesterIntegrationTests' do
pods()
pod 'React-RCTTest', :path => "./RCTTest"
end
post_install do |installer|
if !USE_FRAMEWORKS
flipper_post_install(installer)
end
end