I was troubleshooting a weird problem with min_native_interface not seemingly doing anything.
Then I realized that if I had android-versionCode="2", the apk would actually have a version code of 20, 22 or 24 (depending on platform, arm/x86/etc) even though AndroidManifest.xml would show version code as being 2. This can be confirmed by running aapt dump badging package.apk.
The reason for this behavior is here: https://issues.apache.org/jira/browse/CB-8976
So incrementing the version code for android to 3 in cordova's config.xml would require setting min_native_interface to at least 30.
This doesn't happen for iOS, so the version code would still be 3 in this case.
The workaround here is to make sure that ios version codes are incremented by 10 in order to keep the android and ios packages in sync.
So for version code 3, the following needs to be done:
<widget id="..." android-versionCode="3" ios-CFBundleVersion="30"> and min_native_interface has to be set to 30.
This should be added to the readme at the very least. I'm not sure if there are any ways to solve it, perhaps one way would be to separate min_native_interface into min_native_interface_android and min_native_interface_ios
I was troubleshooting a weird problem with
min_native_interfacenot seemingly doing anything.Then I realized that if I had android-versionCode="2", the apk would actually have a version code of 20, 22 or 24 (depending on platform, arm/x86/etc) even though AndroidManifest.xml would show version code as being 2. This can be confirmed by running
aapt dump badging package.apk.The reason for this behavior is here: https://issues.apache.org/jira/browse/CB-8976
So incrementing the version code for android to
3in cordova'sconfig.xmlwould require settingmin_native_interfaceto at least30.This doesn't happen for iOS, so the version code would still be
3in this case.The workaround here is to make sure that ios version codes are incremented by 10 in order to keep the android and ios packages in sync.
So for version code 3, the following needs to be done:
<widget id="..." android-versionCode="3" ios-CFBundleVersion="30">andmin_native_interfacehas to be set to30.This should be added to the
readmeat the very least. I'm not sure if there are any ways to solve it, perhaps one way would be to separatemin_native_interfaceintomin_native_interface_androidandmin_native_interface_ios