Appcenter: Support Expo React Native Apps in App Center

Created on 18 Mar 2019  路  59Comments  路  Source: microsoft/appcenter

Describe the solution you'd like
I would like to be able to build RN Expo apps in App center (this is the default way of making RN apps in the RN docs.

Describe alternatives you've considered
I have moved to building RN apps with the RN CLI instead

build feature request reviewed-DRI

Most helpful comment

@nrajpurkar I guess the simplest reason is the fact Expo makes developing React Native apps REALLY simple. Add on the fact that when you go to https://facebook.github.io/react-native/docs/getting-started the first thing you are greeted with is official documentation guiding you to use the Expo CLI with CRNA being the second (non-default) tab tells me a lot of people are likely to start and keep on going this way.

You, I and many others would likely be able to figure out that this isn't a completely React Native app pretty quickly, but to someone looking to put something together it's extremely simple and they might not care to dig further. There are weird things that come up once ejecting from Expo to a "bare Expo" app that someone without access to a Mac, or without the know-how, that someone who started out with the Expo CLI would look at and just wonder why they would continue down this path just to use App Centre (I know I am, I don't own a Mac).

At the end of the day, Expo adds a layer of simplicity to getting small apps started. It is officially recognized as such and is the default tab in getting started with React Native. These 2 things alone would, in my mind, make it something of interest to get smaller devs, or devs who don't want extra hassle like me, to be able to use some of the toolings (specifically builds and testing) MS provides through App Centre. It's cool that Expo offers a build service for free, but I'd prefer to have a more dedicated resource. Maybe eventually the rest of App Centre (analytics, crash reporting, etc.) could be brought over in some capacity (Sentry and Bugsnag work already) to allow the suite to work there, but building and testing are my 2 key areas of interest right now for my small app.

All 59 comments

Would like to leave a comment that building ejected Expo apps work in the AppCenter build process just that you might have to make a slight modification for the iOS builds.

Apparently the AppCenter team decided to hardcode the generation of source maps for iOS instead of relying on the main property inside the package.json file. This results in the failure of the generation of the source maps.

One solution would be to add a index.js script directly in the repo itself using the contents of the file listed in the main property of package.json

For my ExpoKit app. The file has the following contents:

/* global __DEV__ */
import { registerRootComponent } from 'expo';
import { activateKeepAwake } from 'expo-keep-awake';
import App from './App';

if (__DEV__) {
  activateKeepAwake();
}

registerRootComponent(App);

Not sure why they decided to hardcode it to index.js or index.ios.js but that is the current case with regards to building Expo apps in AppCenter

When using the "Configure build" button in App Center, it simply says "We couldn鈥檛 find any React Native Android projects in your branch."

How can I get App Center to use the expo Reactive Native code?

Got a lot further by running "expo eject" to create android and ios folders. Once committed, the App Center found them and allowed a Build to be created.

Glad you were able to get this working @glittle. At the moment ejecting Expo apps is the only supported way to build in App Center.

Is this something MS are looking to add @nrajpurkar? Considering it's the most likely way most people will begin developing (It is the default option in the React Native docs), and it offers likely the best local dev experience, it seems like something that should be supported.

I create simple expo reactnative app, and not able to build in appcenter. After 'expo eject' it able to detect. When appcenter support expo?

Expo support did not make it into our iteration plan for this month. I'm interested into digging deeper into the use case here. Feel free to reach out to me via my email on my profile if you're available to chat a little more. Thanks!

@nrajpurkar I guess the simplest reason is the fact Expo makes developing React Native apps REALLY simple. Add on the fact that when you go to https://facebook.github.io/react-native/docs/getting-started the first thing you are greeted with is official documentation guiding you to use the Expo CLI with CRNA being the second (non-default) tab tells me a lot of people are likely to start and keep on going this way.

You, I and many others would likely be able to figure out that this isn't a completely React Native app pretty quickly, but to someone looking to put something together it's extremely simple and they might not care to dig further. There are weird things that come up once ejecting from Expo to a "bare Expo" app that someone without access to a Mac, or without the know-how, that someone who started out with the Expo CLI would look at and just wonder why they would continue down this path just to use App Centre (I know I am, I don't own a Mac).

At the end of the day, Expo adds a layer of simplicity to getting small apps started. It is officially recognized as such and is the default tab in getting started with React Native. These 2 things alone would, in my mind, make it something of interest to get smaller devs, or devs who don't want extra hassle like me, to be able to use some of the toolings (specifically builds and testing) MS provides through App Centre. It's cool that Expo offers a build service for free, but I'd prefer to have a more dedicated resource. Maybe eventually the rest of App Centre (analytics, crash reporting, etc.) could be brought over in some capacity (Sentry and Bugsnag work already) to allow the suite to work there, but building and testing are my 2 key areas of interest right now for my small app.

I'm also really interested! It's a shame that it's not compatible.

We ended up first ejecting our app and now we are no longer on ExpoKit. It seems this is common practice from asking around our groups.

I ended up doing the same as @jphilipstevens for my previous projects, but as I'm about to start another couple of mobile projects I'm also circling back to this. Just having App Center even just know to eject it and then build RN like normal would be extremely helpful as I debug and build apps out.

Any update on this @nilofer from MS?

@nilofer There's a clear need here, I think this would make App Center a lot more popular than it is right now. There's no documentation out there that supports Expo with CI/CD and publish to TestFlight or Play Store. Having this feature and closely integrating with RN/Expo would greatly benefit a growing community.

Indeed, also interested.
Currently using Expo AuthSession which works for the most part. ad-b2c is most important.
I will also try this solution (with webview) but a truly native solution is better then webview of course

We could really use expo integration with app center! Hope you will integrate it with expo one day. I think a lot of react native projects gets started with expo these days, so it would be a good way to pick up new customers!

@nilofer a bit more in depth explanation:

Expo supports two ways of logging, sentry or bugsnag, and if you also want to capture customer behavior you need segment as well. With app center it seems like we can do that all at once.

Furthermore, the current logging solutions on Expo is located in the US and a lot of public governments in EU, and some private, needs data to be store in EU and be under the GDPR regulation. The privacyshield regulation is not always enough. Therfore bugsnag and sentry is not relevant for EU based companies. App center would be, because microsoft can guarantee data will be in EU.

@nilofer I too would like expo supported within app center. I've sent you an email to provide more detail 馃憤

Yes please!

Is there any plans to add expo support to appcenter?

+1

+1 for expo support to appcenter.

You should do something about it. It's clear that there's a strong need for this support.

I love appcenter as much as the next dev, but bitrise handles this perfectly right now. That might be an option until appcenter supports it?

+1 for expo support to appcenter. 馃挭

+1

+1

+1 for expo support to appcenter.

+1

+1

+1

For those using Azure DevOps, you could use the Azure Pipelines to build the expo app https://medium.com/@raghu1286/react-native-expo-android-ios-ci-builds-for-azure-devops-5458eb0b5e4a and publish the build artifacts to App Center https://docs.microsoft.com/en-us/appcenter/distribution/vsts-deploy.

+1 especially with the RN docs directing you to use Expo

+1

Did app center team does not care about this topic or is it working on it? @elamalani

I also really need this feature. It would greatly simplify the current hack we have to implement to make AD B2C work, which is not stable (using expo sdk's)

AppCenter pipelines outpeform many of app pipelines out there, so does EXPO too. we are definitely interested in AppCenter+Expo support. Expo is being widely recognized one stop dev tool for react-native projects. Interestingly AppCenter has Cordova (preview) available, so why not expo too 馃憤 we are about to start couple of major projects, and its bottleneck while choosing tech stack.

+1

There is a workaround, which is to build your expo app in Azure Devops and send the artifact into App Center, the only problem left would be supporting the SDK for analytics. But that would be on the expo community or app center team making a pull request on expo.

EVERYONE INTERESTED ON THIS PLEASE GO TO THIS LINK AND THUMBS UP THIS FEATURE REQUEST.
WE MUST DO OUR PART AS WELL OTHER THAN JUST COMMENTING HERE :D

https://expo.canny.io/feature-requests/p/support-for-application-insightsapp-center Please support this feature request if you want expo team to notice this. Also please App Center Team try to support this as well. Maybe contributing on this with a Pull Request.

There is a workaround, which is to build your expo app in Azure Devops and send the artifact into App Center, the only problem left would be supporting the SDK for analytics. But that would be on the expo community or app center team making a pull request on expo.

we have expo app in Azure repos. I mapped azure repos in AppCenter. I get following errors:
Android: No android project found
ios: No package.json file is found (very strange, because there is package.json in expo app)

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1
seems to be a necessary one

+1

+1

Are Bare Expo apps supported right now? I tried adding a build configuration for my repository but I get the error: We couldn鈥檛 find any React Native Android projects in your branch.

Are Bare Expo apps supported right now? I tried adding a build configuration for my repository but I get the error: We couldn鈥檛 find any React Native Android projects in your branch.

Yes. If your project has an android and ios folder, it should be recognized. I'm currently running with a bare workflow, no issues. I'm not entirely sure of what else App Center may be looking for when determining what counts as a "React Native" project.

+1

Expo now allows native code to be added to any managed Expo app with the use of Config Plugins. Could this help add App Center support for Expo apps?

I already gave up馃檭

+1

Was this page helpful?
0 / 5 - 0 ratings