1

I have a Kotlin Multiplatform project and build it for iOS with assembleXCFramwork

Everything works fine and the module is created. But currently I don't see any version in the Info.plist file. In build.gradle.kts I set a version like: version = "1.1.9"

Is it possible to somehow write this version automatically into the Plist.info file?

Patrick_K
  • 219
  • 2
  • 11

1 Answers1

1

Sorry for asking. I guess I just found it here:

https://kotlinlang.org/docs/multiplatform-build-native-binaries.html#export-dependencies-to-binaries

Yes it works with this setting

binaries {
    framework {
        binaryOption("bundleVersion", "1.1.9")
    }
}
Patrick_K
  • 219
  • 2
  • 11
  • 1
    Thanks for sharing this! Additionally, it's worth noting that `bundleShortVersionString` is the version number ("Version" in Xcode) and `bundleVersion` is the build number ("Build" in Xcode). Reference: https://stackoverflow.com/a/31921249/1470581 and https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring – Derek Lee Mar 17 '23 at 08:00