Skip to content

Commit ba6dc35

Browse files
ken0nekfacebook-github-bot
authored andcommitted
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: #38344 Test Plan: None as no behavioral changes Reviewed By: christophpurrer Differential Revision: D47466540 Pulled By: javache fbshipit-source-id: d770189e065899181a8b4ea17465beef09607d2f
1 parent 01594ca commit ba6dc35

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

packages/react-native/ReactAndroid/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ android {
458458
namespace "com.facebook.react"
459459

460460
// Used to override the NDK path/version on internal CI or by allowing
461-
// users to customize the NDK path/version from their root project (e.g. for M1 support)
461+
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
462462
if (rootProject.hasProperty("ndkPath")) {
463463
ndkPath rootProject.ext.ndkPath
464464
}

packages/react-native/ReactAndroid/hermes-engine/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ android {
130130
namespace "com.facebook.hermes"
131131

132132
// Used to override the NDK path/version on internal CI or by allowing
133-
// users to customize the NDK path/version from their root project (e.g. for M1 support)
133+
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
134134
if (rootProject.hasProperty("ndkPath")) {
135135
ndkPath rootProject.ext.ndkPath
136136
}

packages/react-native/scripts/cocoapods/utils.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def self.fix_library_search_path(config)
171171
end
172172

173173
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)\"")
174-
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1)
174+
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple Silicon)
175175
# since the libraries there are only built for x86_64 and i386.
176176
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
177177
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")

packages/react-native/scripts/find-node-for-xcode.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ set -e
2121
# the running shell process will choose a node binary and a global package directory breaks version managers
2222
unset PREFIX
2323

24-
# Support Homebrew on M1
25-
HOMEBREW_M1_BIN=/opt/homebrew/bin
26-
if [[ -d $HOMEBREW_M1_BIN && ! $PATH =~ $HOMEBREW_M1_BIN ]]; then
27-
export PATH="$HOMEBREW_M1_BIN:$PATH"
24+
# Support Homebrew on Apple Silicon
25+
HOMEBREW_APPLE_SILICON_BIN=/opt/homebrew/bin
26+
if [[ -d $HOMEBREW_APPLE_SILICON_BIN && ! $PATH =~ $HOMEBREW_APPLE_SILICON_BIN ]]; then
27+
export PATH="$HOMEBREW_APPLE_SILICON_BIN:$PATH"
2828
fi
2929

3030
# Define NVM_DIR and source the nvm.sh setup script

packages/react-native/scripts/react_native_pods.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def use_react_native_codegen!(spec, options={})
356356
}
357357
end
358358

359-
# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon (M1) machines.
359+
# This provides a post_install workaround for build issues related Xcode 12.5 and Apple Silicon machines.
360360
# Call this in the app's main Podfile's post_install hook.
361361
# See https://github.com/facebook/react-native/issues/31480#issuecomment-902912841 for more context.
362362
# Actual fix was authored by https://github.com/mikehardy.

packages/rn-tester/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Both macOS and Xcode are required.
3434
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.
3535
4. Open the generated `RNTesterPods.xcworkspace`. This is not checked in, as it is generated by CocoaPods. Do not open `RNTesterPods.xcodeproj` directly.
3636

37-
#### Note for M1 users
37+
#### Note for Apple Silicon users
3838

39-
If you own a Mac M1 laptop, you need to run some different commands to install and run cocoapods.
39+
If you own a Mac laptop with Apple Silicon, you need to run some different commands to install and run cocoapods.
4040

4141
- `sudo arch -x86_64 gem install ffi`: this installs the `ffi` package to load dynamically-linked libraries.
4242
- `arch -x86_64 pod install`: this run `pod install` with the right architecture.

packages/rn-tester/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ android {
9494
namespace "com.facebook.react.uiapp"
9595

9696
// Used to override the NDK path/version on internal CI or by allowing
97-
// users to customize the NDK path/version from their root project (e.g. for M1 support)
97+
// users to customize the NDK path/version from their root project (e.g. for Apple Silicon support)
9898
if (rootProject.hasProperty("ndkPath")) {
9999
ndkPath rootProject.ext.ndkPath
100100
}

0 commit comments

Comments
 (0)