-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I make the react-native-macos work with ios? #2118
Comments
related: #414 |
@Saadnajmi can you help me with this? |
Are you sure that this is working? Looks a bit sketchy to me.
|
@dev-johnny-gh So React Native macOS works for iOS, macOS, and visionOS. I'm not sure what you're doing with the |
That being said, I'm pretty sure |
Thanks for your reply @Saadnajmi Yes, that's why I'm asking for help, I have an iOS project and a macOS project on the same repo, and they both use the same React native code. So, for example, when I install "React-Native-Screens" package and run |
@AdrianFahrbach it's weird but it can work. what I'm trying to do here is: I'm trying to exclude those packages that are not compatible with macOS on react-native.config.js. When I ran pod install, react-native.config.js got called and i try to exclude them by using
but with no luck |
Description
I'm working on a project which needs to be compatible with both macOS and iOS. so I install react-native-macos with the iOS project together. but many React native packages only support iOS and Android.
So when I'm building an iOS project, everything works fine. but when I go to the mac project, it's broken.
Here is the actual steps i run on mac project:
So i tried to fix this issue and did a lot of search, and someone said that use the react-native.config.js to skip dependencies:
I did what he said and I still got those linking errors.
So, what should I do to skip these packages' auto-linking on react native macos?
React Native Version
0.73.2
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 14.0
CPU: (8) arm64 Apple M1
Memory: 170.47 MB / 8.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.1
path: ~/.nvm/versions/node/v18.16.1/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v18.16.1/bin/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.1/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.14.3
path: /Users/xxx/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10227.8.2321.11479570
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.10
path: /Users/xxx/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.7.6
path: /Users/xxx/.rvm/rubies/ruby-2.7.6/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.2
wanted: 0.73.2
react-native-macos:
installed: 0.73.13
wanted: ^0.73.13
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
info React Native v0.74.1 is now available (your project is running on v0.73.2).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.74.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: