- If you are doing some changes and want to see in your device you have to enable the Hot/Live Reloading which can be done form the Developer Menu. To open the Developer Menu in Real Device you just need to shack the device and it will open the Developer Menu popup for you. This is how you can run the React Native App on Real Device.
- I'm trying to run react native on mac, I run the android emulator in the background and run react-native run-android and I get: => react-native run-android Scanning 564 folders for symlinks in.
To slowly and steadily lose the excess weight, as recommended by the American Academy of Family Physicians, a daily reduction of 250 How To Run React Native App Android On Mac to 1,000 calories is advised, which should lead to a loss of 0.5 to 2 lbs.
So I first saw a tweet by Kaiyes Ansary, about creating a Expo-Electron based macOS menu bar apps, which I found the idea interesting, since Tempomat has been on the market for a couple of weeks already but the process of learning and mastering native APIs, swift and SwiftUI was not easy at all, I also saw the microsoft just added macOS support for React native and I thought… I think I can make that work, and I did, so now I’m sharing the joy
npx react-native init myApp --template react-native-template-typescript
A simple rn project, nothing fancy here
This is bound to change, you should always follow the instructions on the microsoft react-native-macos site, but for now you can do: Lifehacker best free mac apps 2017.
Afterwards you should have a basic RN mac os app, you can try to run it and it will open a normal window https://renewforce961.weebly.com/blog/how-to-find-where-apps-are-downloading-on-mac.
Ok, this step is not 100% necessary, you could just set up the statusbar button on obj-c but I don’t know objective-c, so I had to do it, therefore delete:
And instead create an AppDelegate.swift, Xcode will ask you if you want to create a bridging header, say yes, and that the following contents:
On the bridging header file
On the AppDelegate.swift
Not gonna give away too much of my own code, but that should get you started to have a working status bar item that you can click on.
PLEASE DO NOTE You have to change the module name when registering the root view, in the above snippet it is “tempomat” should be w/e you named your react-native project.
Mac allow apps downloaded anywhere no listed. If you don’t want your app to appear on the macOS dock and sit on the background (you won’t be able to alt-tab to it): on your info.plist you need to set the value
Application is agent (UIElement)
to YES
This part of your Mac is hidden from view for a reason. But let’s take a look:Click on Finder Go (in the top menu).Now paste in: Library/CachesSee those small folders? Messing up a few folders here may break your Mac. Mac app clean text. This is where your “Other” storage is.
On your
Main.storyboard
file, delete the old references to the ViewController and the window, and you also have to change the app delegate on the right side attribute panel and give it your macos module, otherwise it won’t be picked up, here is a screenshot that should guide you on where to look ?:I did run into some weird swift compilation chain error, I think it was because of Flipper support in RN 0.62, make sure that on your target settings
DEAD_CODE_STRIPPING
is set to YES
and Always embed swift libraries
is also set to YES
Done, you should be able to hit the run button via xcode (or run the app via
npx react-native run-macos
) and should see your RN menu bar running!BUT, there is catch, right now react-native-macos is so fresh… pretty much none of the existing libraries are working, and sometimes that will also mess up your
pod install
react native vector icons work fine if you follow the macOS steps, but I ended up creating the following yarn command to being able to run pod install without autolinking messing with it:IWrite is an app just like windows notepad however, iWrite contains more features compare. Best mac pro apps 2017. 1Password: 1Password to rule them all: Given how many accounts we have, it's getting harder to.
You also won’t have the latest version of react-navigation working, I got the latest version of the v2 working and that is fine for now… so yeah, a lot of compromises, but the future looks bright!
How To Run React Native App On Mobile
I have also created a ready to go template for you to play around, just clone it and hit the run button!
Now that you made it here (and I’m sure you like menu bar apps), check out Tempomat, if you work with CIs I’m sure it will make your life easier! also coming to iOS and Android soon!
![Run react native in browser Run react native in browser](/uploads/1/3/3/9/133915066/766672775.jpg)
- After some weeks I discovered a couple of problems, one is, I forgot to load the production bundle when using the app on release mode, I updated the contents of AppDelegate on this article to reflect the change.
- Since we are using Swift, the normal flags for the change in (1) won’t work so easily, you need to set new Swift flags on the project settings in xcode, go to build settings and search for
Other swift flags
on the macOS target and add-DDEBUG
The template project has been updated to reflect this changes
Munich, 23.05.2020
![Mac Mac](/uploads/1/3/3/9/133915066/997682647.jpg)
Projects
Run React Native In Browser
Site icon 'Ekeko' created by Coloripop on The Noun Project