Coder Social home page Coder Social logo

Comments (9)

stovmascript avatar stovmascript commented on July 22, 2024 1

I think updating AndroidManifest.xml is out of the scope of this package. RNV's job should be to update the topmost values, which you'd otherwise have to update manually in a RN app. Android manifest files get updated dynamically during build, which is what RN users expect, so updating them with RNV would actually create confusion.

from react-native-version.

stovmascript avatar stovmascript commented on July 22, 2024

Hey @olegdizus. I think RN updates these values in memory during build time. Looking at RN projects I've worked on, I see that they always stay at their default values:

<manifest
	android:versionCode="1"
	android:versionName="1.0"

Why do you need them to be updated?

from react-native-version.

jsdario avatar jsdario commented on July 22, 2024

It seems to me that they are mandatory for the play store, aren't they?

from react-native-version.

stovmascript avatar stovmascript commented on July 22, 2024

@jsdario I don't dispute that. I'm just saying that I've never seen this file updated since doing react-native init, therefore I don't think RNV should update it either.

When you're building an APK for the Play Store, they should be updated during the build process. Or am I missing something?

from react-native-version.

stovmascript avatar stovmascript commented on July 22, 2024

I think React Native's behaviour in this case is indeed weird, but it makes sense to update the values only in the Gradle file. Or vice versa, but definitely not in two places.

from react-native-version.

stovmascript avatar stovmascript commented on July 22, 2024

But I would still like to know if there's any interesting use case that would warrant updating AndroidManifest.xml, because we could then make an extra option for it.

from react-native-version.

matthewphiong avatar matthewphiong commented on July 22, 2024

@stovmascript @jsdario Updating AndroidManifest.xml will not have any effect since the ones written in build.gradle will replace the ones in AndroidManifest.xml during build.

But it might be a good idea to also update the values in AndroidManifest.xml to clear any confusion created by different values of versionCode and versionName in build.gradle and AndroidManifest.xml

from react-native-version.

jsdario avatar jsdario commented on July 22, 2024

The PR above is just a draft on how it was implemented under the organisation I work in. Feel free to copy / paste, improve or close it.

Hope it helps.

from react-native-version.

stovmascript avatar stovmascript commented on July 22, 2024

@jsdario Ok, thanks.

from react-native-version.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.