Thread
#multiplatform
    Jack Darlington

    Jack Darlington

    1 year ago
    Hi everyone, does anyone know of away to exclude a platform from cocoapods. E.g. download framework for ios and not for macos?
    In case it helps anyone, this is what I added: -
    afterEvaluate {
        tasks.forEach {
            if (it.name.toLowerCase().contains("pod") && it.name.toLowerCase().contains("osx")) {
                it.enabled = false
            }
        }
    }
    Found out this doesn't work, if anyone has any ideas
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    1 year ago
    Hello, @Jack Darlington! This is a known problem, described here: https://youtrack.jetbrains.com/issue/KT-31000 As far as I know, this feature is in development at the moment. You can follow the issue on YouTrack if you want to get informed as soon as it would be ready.
    Jack Darlington

    Jack Darlington

    1 year ago
    Thanks for the reply, much appreciated. Are there any workarounds you are aware of? When I try and disable the task (with code above), even though it says the Swift Osx task is skipped, it still fails.
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    1 year ago
    Unfortunately, I cannot provide a workaround right now. The
    osx
    thing here, it’s your custom target name?
    Jack Darlington

    Jack Darlington

    1 year ago
    yeh so its for the macosx64 target. I have managed to work around it, by having a gradle.properties that has enableIos and enableMacOs flags, so I can toggle the of and off depending on the project I want to build. It will do for now, but is just a temporary fix
    I got to the bottom of it, the issue is having typed extension variables
    I had a function fun var <T> XClass.blah: T
    obviously it isn't supported yet
    glad to get to the bottom of it