Currently whenever I made changes to React Native applications, I will have to change version number in multiple places
{
"name": "My Awesome App",
"version": "1.2.0",
...
}
<key>CFBundleShortVersionString</key>
<string>1.2.0</string>
defaultConfig {
...
versionCode 1
versionName "1.2.0"
Is there a much simpler way to handle updating versioning like for example configuring in such a way where Info.plist and build.gradle automatically pointing to package.json?
Reusable code This is one of the greatest advantages of cross-platform development – you can build just one codebase for both Android and iOS at the same time.
You could use react-native-version-up which allows you to bump the version in different ways in your package.json, build.gradle and info.plist.
Personally, I do not go with the approach of keeping all in sync. Since I'm following semver for all my JS-based projects, it can happen that some changes (i.e. a bugfix) affect only one platform and in that case, I would need to bump the version only for that one platform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With