Skip to content

Commit

Permalink
feat(Experience): platform os
Browse files Browse the repository at this point in the history
add platform os
  • Loading branch information
hamada147 committed Sep 12, 2022
1 parent 51d1cf9 commit 208a04f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.iohk.prism.apollo

actual object Platform {
actual val OS: String = "Android ${android.os.Build.VERSION.SDK_INT}"
}
5 changes: 5 additions & 0 deletions Apollo/src/commonMain/kotlin/io/iohk/prism/apollo/Platform.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.iohk.prism.apollo

expect object Platform {
val OS: String
}
7 changes: 7 additions & 0 deletions Apollo/src/iosMain/kotlin/io/iohk/prism/apollo/Platform.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.iohk.prism.apollo

import platform.UIKit.UIDevice

actual object Platform {
actual val OS: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion
}
5 changes: 5 additions & 0 deletions Apollo/src/jsMain/kotlin/io.iohk.prism.apollo/Platform.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.iohk.prism.apollo

actual object Platform {
actual val OS: String = "JS"
}
5 changes: 5 additions & 0 deletions Apollo/src/jvmMain/kotlin/io/iohk/prism/apollo/Platform.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.iohk.prism.apollo

actual object Platform {
actual val OS: String = "JVM"
}

0 comments on commit 208a04f

Please sign in to comment.