Error uploading app built with KMM to the appstore...
# multiplatform
s
Error uploading app built with KMM to the appstore 😞 Has anyone got a fix for this? I've found a few threads about it but not an actual fix. I'm not using pods and just using
embedAndSignAppleFrameworkForXcode
in the build phase. This happens when attempting to upload to the appstore (everything works locally)
Copy code
The binary file '<http://iosApp.app/Frameworks/shared.framework/shared|iosApp.app/Frameworks/shared.framework/shared>' is not permitted. Your app can't contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles.
Follow up on this. It's being caused by my attempting to make the Framework static. Has anyone been able to make the KMM module static and upload the resulting app to the Appstore?
Copy code
listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach {
        it.binaries.framework {
            baseName = "shared"
            isStatic = true <-- Commenting this out fixes the issue
        }
    }
c
Could it be that you are embedding the framework? AFAIK, you do not need to embed a static framework since it is compiled into your app binary itself
s
I also thought that but I'm not seeing anywhere in the xcode project where it's being linked or embedded 😭
c
Under the "General" tab of the project there is a "Frameworks, Libraries and Embedded Content" section
s
Yeah it looks all good to me 😞
c
Hmm, I have no clue then 😕
s
No probs thanks for your help anyway!
s
What is the situation around this topic nowadays? We are experiencing the same error when using a static library, but it seems like this issue was marked as fixed. Is the idea that it's marked as fixed since you are either supposed to not use a static library, or that you are supposed to do this?
Copy code
tasks.named("embedAndSignAppleFrameworkForXcode").configure {
    enabled = false
}