Open
Description
buildVersion
is typed as ?string
in the JS code.
https://github.com/APSL/react-native-version-number/blob/master/index.js#L7
type VersionObject = {
appVersion: ?string,
buildVersion: ?string,
bundleIdentifier: ?string
};
However, in the Android code, versionCode
from PackageInfo
is used, which is a Java int
https://developer.android.com/reference/android/content/pm/PackageInfo#versionCode
https://github.com/APSL/react-native-version-number/blob/master/android/src/main/java/com/apsl/versionnumber/RNVersionNumberModule.java#L41
constants.put(APP_BUILD, packageManager.getPackageInfo(packageName, 0).versionCode);
This usually doesn't present itself as a problem, but in some cases - such as when passing this value back across the bridge - there can be problems. Probably would be best to convert it to a string before passing it over the bridge the first time.
Metadata
Metadata
Assignees
Labels
No labels