Skip to content

Commit b167e81

Browse files
authored
fix: handle new path to native_modules in CLI (#2756)
## Summary: Resolves #2723
1 parent 9739b56 commit b167e81

File tree

1 file changed

+7
-2
lines changed
  • packages/react-native/local-cli/generator-macos/templates/macos

1 file changed

+7
-2
lines changed

packages/react-native/local-cli/generator-macos/templates/macos/Podfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
2-
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
1+
autolinking_script = File.expand_path('../node_modules/react-native-macos/scripts/cocoapods/autolinking.rb', __dir__)
2+
if File.exist?(autolinking_script)
3+
require_relative '../node_modules/react-native-macos/scripts/cocoapods/autolinking'
4+
else
5+
require_relative '../node_modules/react-native-macos/scripts/react_native_pods'
6+
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
7+
end
38

49
prepare_react_native_project!
510

0 commit comments

Comments
 (0)