Skip to content

small changes for publish on google play#14

Open
sseerrggii wants to merge 1 commit into
masterfrom
new-version-22
Open

small changes for publish on google play#14
sseerrggii wants to merge 1 commit into
masterfrom
new-version-22

Conversation

@sseerrggii
Copy link
Copy Markdown
Contributor

@sseerrggii sseerrggii commented Dec 14, 2022

I was trying to create apk pointing to production with

eas build --profile production --platform android

But it always create a build that point to staging... for that I tried to modify https://github.com/coopdevs/timeoverflow-mobile-app/pull/14/files#diff-9b5b5955d0e684e7904f3fc143e07aaa11b7e7c3b36d10985c4aff2554940cbf and it works, now apk resultant points to production, could be that env variables aren't working fine?

I update also version number in order to publish on google play

Comment thread eas.json
}
},
"production": {
"distribution": "internal",
Copy link
Copy Markdown
Collaborator

@sauloperez sauloperez Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not the intended use of "internal distribution". According to https://docs.expo.dev/build/internal-distribution/:

Uploading your app to TestFlight and Google Play beta can be time-consuming (...) and limiting (...). Both Android and iOS provide alternative mechanisms to distribute apps directly to testers, so they can download and install them to physical devices directly from a web browser as soon as the builds are completed.

EAS Build can help you with this by providing shareable URLs for your builds with instructions on how to get them running, so you can share a single URL with a teammate that'll include all of the information they need to test the app. Interestingly, the example they use is of a preview profile, nothing related to production.

There's an alternative and more explicit way to generate an APK. Taken https://docs.expo.dev/build-reference/apk/#configuring-a-profile-to-build-apks, we can add the following in this production profile. That's I would prefer here.

"android": {
   "buildType": "apk"
}

For the record, from https://docs.expo.dev/build/automating-submissions/, it seems that the process is rather meant to be handled automatically by using the --auto-submit flag. We're not there yet tough. I wouldn't spend time making it work now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to work on this later on. https://docs.expo.dev/build/eas-json/#production-builds is pretty explicit on how this should be done:

Production builds must be installed through their respective app stores; they cannot be installed directly on your Android Emulator or device, or iOS Simulator or device. The only exception to this is if you explicitly set "buildType": "apk" for Android on your build profile; however, it is recommended to use AAB when submitting to stores, and this is the default configuration.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the record, I solved this using buildType in #15.

Comment thread app.json
"googleServicesFile": "./google-services.json",
"package": "org.timeoverflow.mobileapp",
"versionCode": 20
"versionCode": 22
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we could get Expo to this increment for us if we specified "autoIncrement": true in the production profile in eas.json. See remote version source on https://docs.expo.dev/build-reference/app-versions/.

I'm not meaning to do it here, but it's some worth exploring soon. This version bump is to me the biggest bottleneck to publish versions and automate the process.

Comment thread App.js
const baseUrl = () => {
console.log('extra.baseUrl =', Constants.expoConfig.extra.baseUrl);
return Constants.expoConfig.extra.baseUrl || "https://staging.timeoverflow.org";
return Constants.expoConfig.extra.baseUrl || "https://www.timeoverflow.org";
Copy link
Copy Markdown
Collaborator

@sauloperez sauloperez Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this baseUrl in #15. That is how it was supposed to work.

@sauloperez
Copy link
Copy Markdown
Collaborator

@sseerrggii , what I would do now is to get #15 merged, and then rebase this onto master and apply my suggested changes. I take this over if you prefer.

@sauloperez
Copy link
Copy Markdown
Collaborator

sauloperez commented Dec 17, 2022

Now that #15 got merged we can close this. The upgrade of the expo dependency can be done at any other time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants