https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
y

yshrsmz

01/29/2019, 1:35 PM
btw I’ve managed to publish mpp library to bintray without bintray plugin. https://github.com/yshrsmz/kgql/
v

Vishal

08/08/2019, 6:46 AM
Hey I need to create a multiplatform library which will call GraphQL WebService and it will be used by both Android and IOS. Is is possible if yes, please guide me. Thanks!
y

yshrsmz

08/08/2019, 9:10 AM
@Vishal kgql supports both Android and iOS. Currently README and its test cases are everything you can refer, so first please go through these stuff, and let me know if you find anything unclear https://github.com/yshrsmz/kgql/tree/master/kgql-gradle-plugin/src/test
v

Vishal

08/08/2019, 10:27 AM
Thanks for you reply. I've push my simple multiplatform code to https://github.com/viskp/kotlin-multi-platform and i took the reference from https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html Now my repository
kotlin-multi-platform
have the simple code for getting the OS name from two different classes
androidMain/kotlin/actual.kt
and
iosMain/kotlin/actual.kt
and that name is getting exposed in
commonMain/kotlin/common.kt
which have a method
createApplicationScreenMessage()
which will be called by Android and IOS. Now i have a graphQL Webserver and i want to write the common code(maybe in commonMain/kotlin/common.kt) for getting data from my graphQL server which will be used by both android and IOS.