Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better building for release story for iOS and Android #179

Closed
elicwhite opened this issue Feb 19, 2019 · 7 comments
Closed

Better building for release story for iOS and Android #179

elicwhite opened this issue Feb 19, 2019 · 7 comments
Labels
command: run-ios discussion feature request no-stale-bot This issue cannot be marked as stale by stale bot

Comments

@elicwhite
Copy link
Contributor

In the docs for running on device, it recommends running the following command on iOS:
https://facebook.github.io/react-native/docs/next/signed-apk-android#testing-the-release-build-of-your-app

react-native run-ios --configuration Release

and the following command for Android:
https://facebook.github.io/react-native/docs/next/signed-apk-android#testing-the-release-build-of-your-app

react-native run-android --variant=release

Is there a reason that these are different, one being configuration and one being variant? Should they both be the same?

@elicwhite elicwhite added bug Something isn't working question Further information is requested discussion command: run-ios docs Documentation change and removed bug Something isn't working labels Feb 19, 2019
@thymikee
Copy link
Member

That's a good question to ask! "Variant", "Configuration" (and "Scheme") are platform specific and make sense for native developers. I usually use Fastlane to deal with all that and the options passed to specific actions/lanes are also platform-specific.

I think it would be great to unify the interfaces, but it requires someone with extensive iOS and Android building knowledge to come up with simple but permissive API (and see if it makes sense at all).

cc @ferrannp @krizzu @michalchudziak @dratwas

@grabbou
Copy link
Member

grabbou commented Feb 26, 2019

If the command was run (rather than run-ios and run-android), I think unifying the names would make more sense. Still, I feel it is a very ambitious task with potentially high risk of limiting the API for future extension (what about features that are iOS specific?)

We could optimise for this particular use-case by aliasing both --variant and --Configuration with something else, e.g. --mode=Release|Debug

@radex
Copy link
Member

radex commented Apr 1, 2019

We could optimise for this particular use-case by aliasing both --variant and --Configuration with something else, e.g. --mode=Release|Debug

Or a general API: --mode=release|debug that is overridable (not just aliased) per-platform with --android-variant and --xcode-configuration

@grabbou
Copy link
Member

grabbou commented Apr 3, 2019

@radex, sounds like a plan. Would you be up to sending a quick PR? ❤️

@thymikee
Copy link
Member

Adding to the OP, the fact that we have run-* commands, that additionally spawn Metro server and boot up simulators, is not something a user wants when building their up, e.g. on a CI.

I believe we should introduce build-android and build-ios that share their backend with run-* commands, but without starting Metro instance and booting up a simulator. In addition to --mode flag mentioned here, I think that would provide a proper DX.

@thymikee thymikee removed docs Documentation change question Further information is requested labels Apr 29, 2020
@thymikee thymikee changed the title Building for release mode difference between iOS and Android Better building for release story for iOS and Android Apr 29, 2020
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

@github-actions github-actions bot added the stale label Dec 1, 2022
@adamTrz adamTrz removed the stale label Dec 2, 2022
@TMisiukiewicz TMisiukiewicz added the no-stale-bot This issue cannot be marked as stale by stale bot label Dec 6, 2022
@szymonrybczak
Copy link
Collaborator

I think I can close this issue, we have --mode which unifies selecting configuration/variant on both platforms, and we also have build-ios & build-android commands which were introduced in #1744 & #1739.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command: run-ios discussion feature request no-stale-bot This issue cannot be marked as stale by stale bot
Projects
None yet
Development

No branches or pull requests

7 participants