<@UJRUJP0F9> sorry for the ping, but I’ve got this...
# kotlin-native
r
@Artyom Degtyarev [JB] sorry for the ping, but I’ve got this issue ( https://youtrack.jetbrains.com/issue/KT-39801 ) while being stuck on Kotlin 1.3.6x for other reasons… Is the workaround published for other Kotlin versions, or is it possible to do so? Or is the workaround source code opened somewhere I can clone, change the version and publish locally? Thanks We’re going to upgrade to Kotlin 1.4 but probably not anytime soon (a few weeks to a few months from now), so a definitive fix is not mandatory, if you have a better idea of how I can make things “just work” in the meantime, like putting some header somewhere, I don’t know My issue:
Copy code
Showing Recent Issues
[...}project-cinterop-MaterialComponents.klib-build/kotlin/framework/MaterialComponents/MaterialComponents.kt: (39, 23): Unresolved reference: UIAxis
Thanks!
👀 1
a
Hello! There is a repository with this workaround library here. One can change the Kotlin version and publish it locally, which should be enough. Feel free to mention or DM whenever you got a question - it only makes it easier to respond faster. So good for all of us!
r
I should even be able to publish it to our internal Artifactory instance which is already required to build our projects anyway, which is actually a really good solution. Thanks a lot 🙂
@Artyom Degtyarev [JB] Well, so I tried just that, and I was able to publish the project locally just fine, but when building my app which depends on this locally published libs, I get a compiler crash
a
Interesting. The only similar thing I’ve found is this issue(https://github.com/JetBrains/kotlin-native/issues/3855). Am I getting this correctly that without the workaround lib this code compiled just fine? With a previous Xcode version ofc.
r
Haha, I was just reading this issue. No, I changed some code. I need to confirm that I didn’t do exactly what’s described here (pretty sure I did). But this issue is closed, and I would guess it should mean that such error should be properly reported instead of just crashing... ...Or maybe it’s just fixed in 1.3.7x and I’m on 1.3.61 🤡
I mean yeah well
Copy code
private object SingleZoomScrollViewDelegate : NSObject(), UIScrollViewDelegateProtocol {

        override fun viewForZoomingInScrollView(scrollView: UIScrollView) =
            scrollView.subviews.first() as UIView

    }
Weirdly enough, the code that I changed and that worked before was
Copy code
private val scrollViewDelegate = object : NSObject(), UIScrollViewDelegateProtocol {

        override fun viewForZoomingInScrollView(scrollView: UIScrollView) =
            scrollView.subviews.first() as UIView

    }
In my head the crash should still occur with this because it’s still an object subclassing an ObjC thing, but I guess it’s different under the hood. Maybe this one isn’t frozen or something like that, I don’t know. I’ll roll that back and confirm that it works
Ok, I can confirm this works and runs (at least in my emulator, but from the project build file I see it builds from pretty much anything). Thank you 🙂
👍 1