https://kotlinlang.org logo
g

geatmo

12/13/2018, 3:21 PM
Okay.. I'm stupid, and apparently don't know how to google for this, so I'll just ask you guys, if you don't mind. I'm trying to follow this tutorial for Kotlin/MPP: https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html I am on a Windows machine, and I know that I won't be able to compile the iOS portion of this on this machine, but I also cannot resolve the
platform.UIKit.UIDevice
package that's used in the iosMain actual.kt file. So are those packages also not accessible for me from a Windows machine?
h

Hauke Radtki

12/13/2018, 3:39 PM
I use AndroidStudio and it's the same for me here. I think there is no IDE support for the iOS part, at least for windows. Couldn't test it on a Mac yet though
g

geatmo

12/13/2018, 3:39 PM
cool, good to know I'm not alone at least! 🙂
h

Hauke Radtki

12/13/2018, 3:40 PM
Additionally this makes sense because all the Apple Framework libraries aren't even installed on your windows machine
No you are not alone, MPP is giving me a hard time, too 😄
g

geatmo

12/13/2018, 3:50 PM
yeah, that's what I figured, too.. I thought maybe there'd be some kind of intermediate interfaces created by MPP 🙂
h

Hauke Radtki

12/13/2018, 3:51 PM
That would be helpful, but as far as I understand, these interfaces are generated automatically from the actual libraries
j

josephivie

12/13/2018, 5:20 PM
You might be able to add a
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { ... }
around the parts in the Gradle file that reference iOS. I'm not exactly sure how the demo project is structured, but that works for my development and libraries.
s

Sabrina Namur

12/14/2018, 6:32 AM
I used this tutorial and the IDE marks the package "platform" red but it still works fine on a Mac. So when its just red and have the error "unsolved reference: platform", but the code compile it should work. (I work mainly on a windows machine, but I can run it also on a Mac)
o

olonho

12/14/2018, 2:14 PM
there's IDE support for iOS frameworks, but only on macOS hosts
g

geatmo

12/14/2018, 2:16 PM
thanks @olonho, that's what I thought.. will try this out on my colleagues mac on Monday
6 Views