[K/N] Choose watchOS simulator depending on Xcode version
Merge-request: KT-MR-7410 Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
18ce3fc020
commit
bc33f84678
@@ -270,10 +270,11 @@ private fun simulator(project: Project): ExecutorService = object : ExecutorServ
|
|||||||
}
|
}
|
||||||
|
|
||||||
private val device by lazy {
|
private val device by lazy {
|
||||||
|
val version = Xcode.findCurrent().version
|
||||||
val default = project.findProperty("iosDevice")?.toString() ?: when (target.family) {
|
val default = project.findProperty("iosDevice")?.toString() ?: when (target.family) {
|
||||||
Family.TVOS -> "Apple TV 4K"
|
Family.TVOS -> "Apple TV 4K"
|
||||||
Family.IOS -> "iPhone 11"
|
Family.IOS -> "iPhone 11"
|
||||||
Family.WATCHOS -> "Apple Watch Series 6 (40mm)"
|
Family.WATCHOS -> "Apple Watch Series 6 " + (if (version.startsWith("14")) "(40mm)" else "- 40mm")
|
||||||
else -> error("Unexpected simulation target: $target")
|
else -> error("Unexpected simulation target: $target")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user