ge-org / multiplatform-swiftpackage

Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.
Apache License 2.0
333 stars 49 forks source link

Plugin seems to ignore the target version #40

Open stumi01 opened 2 years ago

stumi01 commented 2 years ago

Using this plugin in our project with the following setup:

    multiplatformSwiftPackage {
        swiftToolsVersion("5.4")
        packageName("Common")
        zipFileName("Common")
        outputDirectory(File(rootDir, "/app-ios/CommonFramework"))
        distributionMode { local() }
        targetPlatforms {
            iOS { v("13") }
        }
    }

and when invoking the createSwiftPackage gradle task the framework is created successfully and the ios app can be built without problems. BUT as soon as we try to upload the app an error arise:

ERROR ITMS-90208: "Invalid Bundle. The bundle <AppName> Alpha.app/Frameworks/Common.framework does not support the minimum OS Version specified in the Info.plist

And inspecting the created Info.plist the /app-ios/CommonFramework/Common.xcframework/ios-arm64/Common.framework/Info.plist file contains the following:

<key>MinimumOSVersion</key>
<string>9.0</string>

Which is a problem for us because the KMP module uses some native dependencies which compiled against min 13.0 version that's why we are setting the target version with the plugin.


As a workaround right now we are manually modifying the affected Info.plist file to match the version but it would be better if the plugin would respect the setting and automatically do that for us.

ln-12 commented 2 years ago

I got the exact same problem. Is there a way this can be fixed @ge-org?