Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hello!

I've read on React Native website something interesting! it seems that Microsoft has made some libraries to empower React Native, in order to make it suitable to build Windows/MacOS apps.

Now I think about Expo, what is the plan ?? is it possible for Expo to build for Windows/MacOS like it does for mobile/web now ?

I'd like to open this topic and listen to community thoughts, including Expo team.

Thank you for your attention.

You must be logged in to vote

Replies: 17 comments · 20 replies

Comment options

Yeah there's also react-native-macos. Targeting desktops would be great, but sounds like it is currently not a priority.

This looks to be deprecated, but suggests running the expo web target via Electron:
https://github.com/expo/expo-electron-adapter

At least ChatGPT thinks it's possible 🤷‍♂️
Screenshot 2023-07-28 at 14 50 46

(it isn't 👻)

$ expo add:platform macos
"add:platform,macos" is not an expo command. See "expo --help" for the full list of commands.
You must be logged in to vote
0 replies
Comment options

Seems Expo team is not too interested in Win/MacOS desktop platforms, so perhaps the discussion can be now,
"How to use both Expo & MS-RN4D in the same project with max codeshare?"

You must be logged in to vote
9 replies
@bretthayes
Comment options

Any update on the macOS support @tsapeta? I've been keeping an eye on your related closed PRs. Would love to see something like this in the near future:

"scripts": {
  "start": "expo start",
  "aos": "expo start --aos",
  "ios": "expo start --ios",
  "osx": "expo start —osx",
  "win": "expo start —win"
}

The 3 letter acronyms look clean 😉

@serafdev
Comment options

What if Expo, Flutter, Electron merged together to solve the cross-platform once and for all 😆

@jtwebman
Comment options

I think no matter what you will always have a different project for mobile vs windows vs mac as you are still running native so you are going to have different UI to build for each. I am ok with this as I want it to integrate the best it can into the OS to support all the features I can.

@serafdev
Comment options

I think no matter what you will always have a different project for mobile vs windows vs mac as you are still running native so you are going to have different UI to build for each. I am ok with this as I want it to integrate the best it can into the OS to support all the features I can.

What if the native just becomes the linux kernel @jtwebman so we stop wasting everyone's time

@jtwebman
Comment options

We can have dreams for sure!

Comment options

well, currently there is this issue, if you add macOS to current expo project (ExpoModulesCode seems to be failing build somehow)
facebook/react-native#32704
maybe someone have figured out how to add macOS support to current expo?

trying to find workaround myself, but not sure it will be successful

You must be logged in to vote
0 replies
Comment options

I am trying to convert a React Native Expo app to React Native Windows app and React Native MacOC app. To test if that is possible, I created a project using React Native Expo, ran npx expo prebuild to generate the native source code, and then tried to add macOS/Windows app dependencies.

On macOS, I am facing the ExpoModulesCore issue.

On Windows, I am facing fmt issue:
\node_modules.fmt\fmt-8.0.0\include\fmt\format.h(341,51): error C4996: 'stdext::checked_array_iterator<T*>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.

Any suggestions / workarounds?

You must be logged in to vote
0 replies
Comment options

At this point, it looks like the next major player in the cross-platform app will be Tauri, it's not there yet but they intend to support Web, Mobile, and Desktop, so instead of grabbing the Expo app and wrapping the web version in Electron, just using Tauri directly seems simpler and more performant (at least in desktop).

You must be logged in to vote
2 replies
@isaachinman
Comment options

The problem with Tauri is that it is no better than Capacitor – it uses the OS webview. On iOS and macOS, this is a massive pain, as WKWebView is horrible.

That is the entire draw of Electron: a stable runtime regardless of platform.

I do believe that the only reasonable options are: (1) Electron, or (2) actual native UI components. I would expect a RN-to-desktop implementation to target the second option.

@code-504
Comment options

Yeah, it is a drawback using Tauri. It's easy to set up along with a React Native project, but it has inconsistencies among platforms, and you also need to learn Rust to fully configure Tauri.

Comment options

So is there current guideline for developing an app for win/macos with expo?

You must be logged in to vote
0 replies
Comment options

Here's the screenshot from recent React Conf 2024

image

@EvanBacon please shed some light on building for Mac? And possibly on Windows using RN for Windows?

You must be logged in to vote
3 replies
@tsapeta
Comment options

This was a Mac Catalyst app – a macOS version of the app for iPads. It's not using react-native-macos.

@kirill-konshin
Comment options

Thanks @tsapeta, yep, the one that works on M Macs. But I can't find instructions how to build an Expo app for use with Catalyst... are there any extra steps needed?

Apparently we already had a similar discussion in 2021 #7166 (comment) :)

@kirill-konshin
Comment options

@tsapeta @EvanBacon it would be great to get instructions how to build Expo apps for Catalyst. I can't find any documentation that explains this...

Comment options

Continuous attention
I don't want to export the Expo to the web version and then package it as a client using Electron or Tauri.

You must be logged in to vote
0 replies
Comment options

any update...It would be amazing to have support window/mac version! :)

You must be logged in to vote
0 replies
Comment options

Is this what the #30309 is all about, but For MACOS only?

You must be logged in to vote
0 replies
Comment options

So i did it and worked for me:
first you need to install visual studio.
then run npx expo eject on your expo app.
then install react-native-windows using npm install --save react-native-windows@latest.
then initialize it using npx react-native init-windows --overwrite.
now you can run it using npx react-native run-windows or npx react-native autolink-windows.
That's it!

You must be logged in to vote
4 replies
@jtwebman
Comment options

Does this also work in WSL2 in Ubuntu or do you need to be in the windows system?

@erfanazari
Comment options

I haven't tested it on ubuntu or WSL2.
But i know that it works on windows

@code-504
Comment options

Have you tested it on Expo Web?

I was able to use it on Android, iOS, and Windows, but when I tried to configure it for Web, Expo on Windows stopped working.

@Sowed
Comment options

Have you tried bundling and making a release build for your app @erfanazari?

Comment options

been a while, is there any updates on this?

You must be logged in to vote
0 replies
Comment options

Expo for desktop windows builds wanted! :)

You must be logged in to vote
0 replies
Comment options

https://docs.expo.dev/modules/additional-platform-support
Should get you what you need (for mac)

You must be logged in to vote
1 reply
@Arjan-Zuidema
Comment options

That's just for building a module, not using react-native-macos in expo

Comment options

Any update on if expo will support windows?

You must be logged in to vote
0 replies
Comment options

It's frustrating to watch PRs that would make solid, incremental progress on enabling support for this languish while others sail through without review. It feels like the roadmap at Expo is being driven by a specific team, which doesn't believe Mac development should be part of the agenda. But I think it should be. I interact with a lot of Electron apps daily, which can and do share a lot of code with the web versions of those apps, but which are not native experiences, and take up more resources than they really should. I developed one of these apps, because I had to prioritize desktop, and right now that means Electron, even though my preference in a stack would be React Native/Expo to set up a cross-platform app, which is what I do on another project. It's true that the Mac development experience, even if you solved the Expo part of it, would be rough, but there's a chicken and egg problem that is actively getting solved for the web platform because of Expo's support for it. If React Native's recommendation is "use a framework" and Expo is the only currently recommended framework, then our solid alternatives are... Rock (formerly RNEF)? Stick Expo web in Electron?

You must be logged in to vote
1 reply
@isaachinman
Comment options

Stick Expo web in Electron

This is currently the only good option, as far as I can tell

Comment options

any updates on this ?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Morty Proxy This is a proxified and sanitized view of the page, visit original site.