Image for post
Image for post

Devlog 1: Ejecting from Expo

Hexicon Dev Team
Dec 26, 2019 · 3 min read

We have built Hexicon in many different technologies throughout its history. Our first prototype was written in just HTML and JavaScript and was hosted on Heroku. This was our proof of concept, and we used Firebase to allow us to play against each other asynchronously.

From there, we moved to Unity because we wanted to make Hexicon a cross-platform mobile game, and two of our early project partners were also experienced with Unity. We created a working demo rather quickly, but when those partners left, we took a break from the project —mainly due to our own inexperience with Unity, but also partly due to burnout. Without our experienced team members, we just didn’t have the confidence to build a good app.

We revisited Hexicon a year later, and this time we used React Native and Expo. This allowed us to develop cross platform both quickly and easily and reach a working product as soon as possible.

Expo has two major workflows: managed and bare. The managed workflow (which is what we used at first) allows the abstraction of all the complicated connections to the native code and build process. The bare workflow gives you much more control over your code but requires you to manage a lot of the native build process yourself. However, there are limitations to the managed workflow. The main feature missing is In-App Payments (IAP), and when we reached the point of needing to test IAPs, we finally had to “eject” from Expo and transition from the managed to the bare workflow.

Challenges

1: The main reason we tried to postpone ejecting was our inexperience with native mobile development. We chose React Native because our experience is mostly in web technologies and JavaScript. Ejecting from Expo has been a source of headaches caused mainly by nuances in setting up build files and installing dependencies. It took weeks to even get to a point where we could successfully build the app on Android.

2: Google Play app signing was another major problem. Expo handles all the keys and everything needed to correctly sign your app for upload to the Play Store. When you eject, you have to do the app signing yourself through Android Studio. This took a while to figure out, but there is a way to download your keys from the Expo servers.

3: Once our build was working, we had to migrate and port any incompatible Expo libraries (some are only available in the managed workflow). This meant we had to rewrite our Notifications and Authentication code. We ended up wasting some time trying to use libraries to fill in the gaps, as we realized that we would also need to convert from using the JavaScript Firebase SDK to using the React Native Firebase library.

Trade-offs

As with everything in software development, there are trade-offs. By moving out of the Expo managed workflow, we lose the convenience of testing our app through Expo, which is much quicker.

We also lose Over the Air (OTA) updates. OTA updates allow you to upload new react native code to your published app without having to upload anything new to the App store. At the moment, this is only supported in the managed workflow, but I’ve read that Expo may extend this feature to the bare workflow in the future.

Next Steps

We’ve finished the Android build and are currently testing stability. We’re now tackling the iOS build — we’ll share an update when we get that part to work!

Hexicon

The design and creation of the strategy word game.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store