Michael Paus
06/15/2022, 9:04 AMCould not evaluate onlyIf predicate for task ':iosSimulatorCreateIPad'.
> Field 'dataPathSize' is required for type with serial name 'org.jetbrains.compose.experimental.uikit.internal.DeviceData', but it was missing
Blaž
06/15/2022, 12:35 PMxcrun simctl list --json
, that gradle plugin uses under the hood excpects field dataPathSize
to be present under device section. As you can see here https://github.com/JetBrains/compose-jb/blob/24526947ade74bc7711c8d4219b03b9c45098[…]jetbrains/compose/experimental/uikit/internal/SimctlListData.kt
When I ran that command locally I had a bunch of devices where dataPathSize
was not present and therefore JSON parsing failed.
I am not sure why dataPathSize
is there, whether it should be optional or not, but for me what solved the issue was to just remove all the existing devices by calling xcrun simctl delete <device_id>
for all the devices in xcrun simctl list --json
SeikoDes
06/15/2022, 1:03 PMMichael Paus
06/15/2022, 2:12 PM"com.apple.CoreSimulator.SimRuntime.iOS-13-2"
"name" : "iPhone 11 Pro"
"name" : "iPhone 11 Pro Max"
"com.apple.CoreSimulator.SimRuntime.iOS-9-1"
all
"com.apple.CoreSimulator.SimRuntime.iOS-8-4"
all
"com.apple.CoreSimulator.SimRuntime.iOS-11-3"
"name" : "iPhone 7"
"name" : "iPhone 7 Plus"
"name" : "iPhone 8"
"name" : "iPhone 8 Plus"
"com.apple.CoreSimulator.SimRuntime.iOS-13-0"
"name" : "iPhone 11 Pro"
"name" : "iPhone 11 Pro Max"
"com.apple.CoreSimulator.SimRuntime.iOS-9-0"
all
"com.apple.CoreSimulator.SimRuntime.iOS-8-3"
all
"com.apple.CoreSimulator.SimRuntime.watchOS-2-0"
all
"com.apple.CoreSimulator.SimRuntime.tvOS-9-0"
all
The question is if a missing “dataPathSize” could be safely treated as “dataPathSize” : 0.
The same problem may also occur for the “deviceTypeIdentifier”.Michael Paus
06/15/2022, 2:17 PMBlaž
06/15/2022, 2:38 PMval dataPathSize: Long? = null,
. As i don’t know the significance of that field, I’m not sure if that is the correct solution but looking at some other implementations it should be ok. For example SwiftSimctl completely ignores that field. https://github.com/ctreffs/SwiftSimctl/blob/7cda257c97cf6aecab0adca63e6b9a2816c75281/Sources/SimctlShared/SimctlShared.swift#L319Dima Avdeev
06/18/2022, 10:02 AMDima Avdeev
06/19/2022, 12:20 PMBlaž
06/21/2022, 8:05 AMDima Avdeev
06/21/2022, 8:07 AMMichael Paus
06/21/2022, 11:18 AMMichael Paus
06/21/2022, 11:55 AMimplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
to the commonMain source set the falling-balls-mpp example now works on the iOS simulator again.
Thanks a lot @Dima AvdeevDima Avdeev
06/21/2022, 1:21 PM1.2.0-alpha01-dev724