mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
chore: Replace 'M1' with 'Apple Silicon' in the doc (#38344)
Summary: Use Apple Silicon instead of M1 because we have M2 and other variations too. I did not change the name of `__apply_Xcode_12_5_M1_post_install_workaround` as it's in use. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [FIXED] - Use Apple Silicon instead of M1 Pull Request resolved: https://github.com/facebook/react-native/pull/38344 Test Plan: None as no behavioral changes Reviewed By: christophpurrer Differential Revision: D47466540 Pulled By: javache fbshipit-source-id: d770189e065899181a8b4ea17465beef09607d2f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
01594cae47
commit
ba6dc35337
@@ -458,7 +458,7 @@ android {
|
||||
namespace "com.facebook.react"
|
||||
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
|
||||
if (rootProject.hasProperty("ndkPath")) {
|
||||
ndkPath rootProject.ext.ndkPath
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ android {
|
||||
namespace "com.facebook.hermes"
|
||||
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
|
||||
if (rootProject.hasProperty("ndkPath")) {
|
||||
ndkPath rootProject.ext.ndkPath
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class ReactNativePodsUtils
|
||||
end
|
||||
|
||||
if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
|
||||
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1)
|
||||
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple Silicon)
|
||||
# since the libraries there are only built for x86_64 and i386.
|
||||
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
|
||||
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
|
||||
|
||||
@@ -21,10 +21,10 @@ set -e
|
||||
# the running shell process will choose a node binary and a global package directory breaks version managers
|
||||
unset PREFIX
|
||||
|
||||
# Support Homebrew on M1
|
||||
HOMEBREW_M1_BIN=/opt/homebrew/bin
|
||||
if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
|
||||
export PATH="$HOMEBREW_M1_BIN:$PATH"
|
||||
# Support Homebrew on Apple Silicon
|
||||
HOMEBREW_APPLE_SILICON_BIN=/opt/homebrew/bin
|
||||
if [[ -d $HOMEBREW_APPLE_SILICON_BIN && ! $PATH =~ $HOMEBREW_APPLE_SILICON_BIN ]]; then
|
||||
export PATH="$HOMEBREW_APPLE_SILICON_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# Define NVM_DIR and source the nvm.sh setup script
|
||||
|
||||
@@ -356,7 +356,7 @@ def use_react_native_codegen!(spec, options={})
|
||||
}
|
||||
end
|
||||
|
||||
# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon (M1) machines.
|
||||
# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon machines.
|
||||
# Call this in the app's main Podfile's post_install hook.
|
||||
# See https://github.com/facebook/react-native/issues/31480#issuecomment-902912841 for more context.
|
||||
# Actual fix was authored by https://github.com/mikehardy.
|
||||
|
||||
@@ -34,9 +34,9 @@ Both macOS and Xcode are required.
|
||||
3. Install Bundler and CocoaPods dependencies: `bundle install && bundle exec pod install` or `yarn setup-ios-hermes`. In order to use JSC instead of Hermes engine, run: `USE_HERMES=0 bundle exec pod install` or `yarn setup-ios-jsc` instead.
|
||||
4. Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly.
|
||||
|
||||
#### Note for M1 users
|
||||
#### Note for Apple Silicon users
|
||||
|
||||
If you own a Mac M1 laptop, you need to run some different commands to install and run cocoapods.
|
||||
If you own a Mac laptop with Apple Silicon, you need to run some different commands to install and run cocoapods.
|
||||
|
||||
- `sudo arch -x86_64 gem install ffi`: this installs the `ffi` package to load dynamically-linked libraries.
|
||||
- `arch -x86_64 pod install`: this run `pod install` with the right architecture.
|
||||
|
||||
@@ -94,7 +94,7 @@ android {
|
||||
namespace "com.facebook.react.uiapp"
|
||||
|
||||
// Used to override the NDK path/version on internal CI or by allowing
|
||||
// users to customize the NDK path/version from their root project (e.g. for M1 support)
|
||||
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
|
||||
if (rootProject.hasProperty("ndkPath")) {
|
||||
ndkPath rootProject.ext.ndkPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user