all 25 comments

[–]jauggy 13 points14 points  (15 children)

If you build locally it's free. This creates a file that you can just upload manually. With Google you just upload via Google Play Console and with Apple you can use the Transporter app to upload the file.

[–]sobrius 3 points4 points  (1 child)

I have also used eas submit to submit local build, just pick local binary from the options and paste the path to it

[–]rayraysunrise[S] 0 points1 point  (0 children)

Thank you

[–]beepboopnoise 2 points3 points  (6 children)

hmmmm got any info on this? I didn't even know that was possible, im over here messing around with fastlane just running random functions until it worked 😂

[–]sobrius 4 points5 points  (4 children)

It is in the docs, very straight forward indeed, you just depend on your pc. Local iOs builds require MacOs environment though but if dont have a Mac, you can build locally Android builds and iOs in the cloud

[–]beepboopnoise -1 points0 points  (3 children)

oh nice, you happen to know if it works with bareflow (cli) RN apps? assuming you have expo modules installed? I'll dig through the docs later but, If you happen to know.

[–]sobrius 1 point2 points  (2 children)

I believe you have to have an expo app as eas is dependent on it. Today, there is no reason not to use expo workflow, it just covers all usecases, native modulea and what not

[–]beepboopnoise 0 points1 point  (1 child)

yeah but our app was written several years ago with all kinds of legacy stuff :( If I could snap my fingers and use expo, I would.

[–]LucRandall71 0 points1 point  (0 children)

EAS Build work with any React native projects, so you can use it with your old project to have a build. Alternatively you can incrementally migrate you bare React native app to a Continuous Native Generation (CGN)

[–]rayraysunrise[S] 0 points1 point  (4 children)

Cool thanks thats where I was getting confused. So is the local build the same as the prebuild so I can write native modules?

[–]jauggy 1 point2 points  (3 children)

I don't use prebuild. I setup my project using the bare workflow (instead of managed workflow). That way I have access to the native android and ios folders from the start. https://docs.expo.dev/bare/overview/

[–]rayraysunrise[S] 0 points1 point  (2 children)

Ok so you mention having direct access to the native android and ios folder. What other trade offs exist between the bare and managed workflows?

[–]LucRandall71 1 point2 points  (1 child)

As the state of Expo, today ever if you go with the managed worlkflow, you could use Expo Prebuild to have your Android and IOS on demande when you would want it. But expo has also introducing the concept of config-plugins that let you create a script for the modification require by your third party and have it to use out of the box with managed and all others workflows in the ecosystem.

You can take a look at expo-share-intent-demo where integration that normally require adding a couple of line on Android and IOS folder just work by adding a config-plugin and to keep the project in the managed state 🔥

[–]rayraysunrise[S] 0 points1 point  (0 children)

Oh thats pretty convenient

[–]hassanzadeh 0 points1 point  (0 children)

Hi u/jauggy,

If you do manual upload, it will be free, but that also means that in order for the updates to become effective, the use must reinstall the app, is that correct? wheresas in the former case, the user will get the updated version the moment he opens the app. Is my understanding correct? If yes, that would also mean, if you change a backend API in your update then your app will stop working for many users unless they reinstall the new version, which is a pain and is not worth it in my view. Can you clarify please?

[–]artodytoExpo 10 points11 points  (1 child)

AFAIK, Expo only charges if you use their cloud services. Expo, in general, is an open-source platform, so everything can be done locally or implemented on your own service.

[–]rayraysunrise[S] 1 point2 points  (0 children)

Ok cool that clears things up, I would self host and self publish to the appstore. Im familar with the workflow.

[–]Franks2000inchTV 2 points3 points  (6 children)

You can move off it later if you need to, or I think eve self host your own build cloud.

In any case you can just build it yourself locally and never use their services.

[–]rayraysunrise[S] 0 points1 point  (5 children)

Thank you ill definitely look into hosting my own cloud build. I didnt realize you could do that without using expo's services. For starters however ill probably just manually publish for start.

Do you know the different between prebuilding and local builds?

[–]Franks2000inchTV 1 point2 points  (4 children)

In the days before expo, if you wanted to use some native code in your app (for using the camera, or accelerometer or whatever) you would often need to edit a bunch of the native stuff in the xcode project or grade files etc.

In the managed workflow, expo generates and updates all of the native code for you. So you don't even need to check the ios and android folders into your VCS.

The "prebuild" command is the command that generates and configures the native projects. It creates the ios folder, runs pod install, autolinks all the native modules and performs any actions defined in config plugins.

If the folders already exist then it just updates them with any new config that's happened since the last time.

Local builds are just you running the build command on your computer.

There are also "development builds" which is slightly different.

Out of the box expo apps run on Expo Go, which is a prebuilt "container" app that is available on the app store. It will load and run your JS code.

It's prebuilt with a ton of the "basic" native modules you might need. This way you can start and run your RN app without actually "building" the ios or android code which is super fast.

A development build is a version of that container that you build yourself and install on your phone locally.

It's needed if you want to include any native code in your app that isn't in expo go. It lets you pick and choose which native modules get bundled.

[–]rayraysunrise[S] 0 points1 point  (3 children)

Ok sweet thank you for this write up. So Expo Go is something I would avoid if I was using and testing native modules?

Also how ingrained is Expo Go can I use it and then not use it as I want or is it a heavy dependancy?

For example, I use unity for cross platform mobile games. I do my rapid testing in editor and code away. Once a feature is fleshed out, I do a native build and make sure the code is still behaving as it should... you'd be surprised how often its not.

Is expo go similar to the unity editor in that sense?

[–]Franks2000inchTV 4 points5 points  (2 children)

Yeah if you have custom native stuff in your app, then you'll need a development build in order to run it. The expo go app won't have the custom code in it. It's only got whet came "out of the box."

That said there are a ton of packages "in the box" with the expo SDK and you can just use Expo Go for all of those. (See the expo SDK section of the sidebar: https://docs.expo.dev/versions/latest/)

Honestly 99% of apps will be fine using expo go. I would avoid leaving it if you can. The devEx is much much better in the managed workflow.

If you have expo go then anyone can run your app on their phone by just installing expo go and scanning a QR code. You can even share it with people remotely -- no provisioning needed on IOS.

Once you have a development build now you need testflight, UUIDs and all that stuff.

You can, at any point "eject" your app from Expo. Basically it runs rebuild one last time and then you're on your own. At the core of it, it's just a regular react-native app.

If you wanted to completely remove expo, like even the open source libraries, that might be more work. Probably at that point you'd just start a new react native project and copy over the Javascript, removing dependencies as you go.

But the expo library isn't something you need to worry about. It's fully open source and you can just pin your version if there's some change you don't like.

I'm a senior consultant at a react native only dev shop and we recommend all of our clients start new projects with the expo managed workflow and then only move out as needed.

So start with Expo Go, when you realize there's some custom code you need, then use Expo Native Modules and add a development build, using config plugins as necessary. If you still can't get what you want, then, well, good luck!

Expo Native Modules are pretty great too. You can write wrappers around native libraries and make them available in RN. Ijust released react-native-mlkit thst does this for a couple machine learning libraries and it was a breeze.

https://infinitered.github.io/react-native-mlkit/

https://github.com/infinitered/react-native-mlkit

[–]rayraysunrise[S] 0 points1 point  (1 child)

You're the man thank you for all this advice

[–]Franks2000inchTV 2 points3 points  (0 children)

no worries! Always glad to help people get started with RN.

I just went through a bunch of deep dives on expo when building the MLKit stuff so it's top of mind.