Closed emmanuelproulx closed 7 months ago
Maybe @tsapeta can comment more here, but React Native macOS (and Expo) doesn't currently support adding macOS to an expo-created iOS app. You would have to run react-native-macos-init
on top of an app made with the RN CLI (AKA, redo your step 1)
Hey! Yeah, that's correct – we don't support adding macOS to expo-created projects yet. We're working on this though. Could you please open an issue in https://github.com/expo/expo repo? It's definitely not an issue in react-native-macos
itself, so I think this one can be closed.
well, maybe someone figured out, how to add macos to expo project somehow?
Bump
Update (thanks @tsapeta !)
I see that there is this example repo of an expo macOS app: https://github.com/tsapeta/expo-macos-example
And I see this commit: https://github.com/tsapeta/expo-macos-example/commit/6de11dc8d6c024dc0af53e5e82379bc096f75524
Which looks like it links the native code to get that header and fix the above error. Seems like you need to add this line to your pod file:
require File.join(File.dirname(
node --print "require.resolve('../../../expo/packages/expo/package.json')"
), "scripts/autolinking")
Environment
Steps to reproduce the bug
Following the steps in https://microsoft.github.io/react-native-windows/docs/rnm-getting-started
Expected Behavior
A native Mac app running my blank project.
Actual Behavior
Result: Error
/Users/me/Documents/mynewproject/node_modules/expo/ios/EXAppDefinesLoader.m:5:9: fatal error: 'ExpoModulesCore/ExpoModulesCore.h' file not found
import <ExpoModulesCore/ExpoModulesCore.h>
1 error generated.
Reproducible Demo
No response
Additional context
I tried to fix it using advice found online but all the advice was regarding the iOS platform, not MacOS. So none of it worked. I tried to run pod install from the macos folder, no error.
I also tried to build with XCode with the same error.