paint-brush
Expo Start to Standalone Appby@thelostspore
4,382 reads
4,382 reads

Expo Start to Standalone App

by thelostsporeMarch 27th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

The Maslo private beta iOS app shipped last September and was built using <a href="https://expo.io/" target="_blank">Expo</a> — an open source toolchain built around React Native to help build native iOS and Android projects. Since then, we’ve had to <a href="https://docs.expo.io/versions/latest/guides/detach.html" target="_blank">detach</a> to add native modules such as <a href="https://rnfirebase.io/" target="_blank">RN Firebase</a>, but figured we’d share our complete readme with instructions for deployment to iTunes Connect using <a href="https://docs.fastlane.tools/actions/pilot/" target="_blank">Fastlane’s Pilot</a> and some documentation on avoiding a few pitfalls.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Expo Start to Standalone App
thelostspore HackerNoon profile picture

Fungi photographed by thelostspore in Marin County

A how-to guide from the creators of Maslo

The Maslo private beta iOS app shipped last September and was built using Expo — an open source toolchain built around React Native to help build native iOS and Android projects. Since then, we’ve had to detach to add native modules such as RN Firebase, but figured we’d share our complete readme with instructions for deployment to iTunes Connect using Fastlane’s Pilot and some documentation on avoiding a few pitfalls.

The repo can be found here.

If you’re a web developer and haven’t tried out Expo, you’re in for a pleasant experience — the obvious upside is the ability to develop a native app using Javascript and React while avoiding native development IDEs like Xcode. Getting started is a breeze — install the [exp](https://docs.expo.io/versions/latest/guides/exp-cli.html) CLI via npm and use the built-in scaffolding command to initialize your project.


$ npm install -g exp$ exp init my-project

If you’re starting with our repo, simply clone, install dependencies, and run the start up command (full instructions here, if you’re not using watchman [not required], you’ll need to increase your max open system-level file limit).



$ git clone [email protected]:HeyMaslo/expo-start-to-standalone.git$ cd expo-start-to-standalone$ yarn $ exp start

After the Expo dev server boots up, you’ll be prompted to scan a QR code 🦄

Open the Expo Client app on your phone and scan it. Local build times are brief and Expo supports live reloading. Simply save your Javascript and the app will rebuild on the fly! We’ll save you the mind-blown gifs — code, preview, repeat.

When you’re ready to share your app, publish your project to Expo’s CDN by updating your app configuration & running exp publish. Once published, anyone with the Expo Client app can open a link to run the project on their device or in the browser on Expo’s website via Appetize (get fancy and use exp send to text or email a link to your project).

When the time comes, you’ll no doubt want to build your project for your platform of choice (initially we targeted iOS only). This process requires only three commands and takes up to ~45 minutes in total (aside from creating the app in iTunes Connect, you’ll need to install[fastlane](https://github.com/HeyMaslo/expo-start-to-standalone#deployment) and register for an Expo account, which can also be done with the CLI —exp register).



$ exp build$ curl -O <.ipa download URL>$ fastlane pilot upload

exp build prompts for your developer account information and asks how you’d like to manage your certificate (Expo can handle this for you but allows you to upload your own). Once the build is complete, you’ll be provided with a link to download an .ipa. Download the artifact and run the fastlane command (note: we use this magic incantation when running into transport errors) — after following the prompts and waiting for up to a half hour, your build will appear in your app’s build list 🙌 🎉

If you’re like us, you’ll want to celebrate a deploy by pouring an IPA 🍺 Before raising your glass, show some love to the folks at Expo for making it so easy to develop native apps 🍻

Maslo is a voice journal with personality and smarts. Get Maslo for iOS.