Comments (3)
Quick fix:
struct Device {
private let stateValue: String
// availabilityValue type changed to Bool
private let availabilityValue: Bool
public let name: String
public let UDID: String
}
from opensim.
Quick fix:
struct Device { private let stateValue: String // availabilityValue type changed to Bool private let availabilityValue: Bool public let name: String public let UDID: String }
I used your code and the following to support both availability
& isAvailable
:
struct Device {
private let stateValue: String
private let availabilityValue: Bool?
private let isAvailable: Bool?
public let name: String
public let UDID: String
}
let availability: Bool? = availabilityValue ?? isAvailable
switch availability {
case .none:
return .unavailable
case .some(let value):
return value ? Availability.available : Availability.unavailable
}
}
extension Device: Decodable {
enum CodingKeys: String, CodingKey {
case UDID = "udid"
case name
case stateValue = "state"
case availabilityValue = "availability"
case isAvailable
}
}
from opensim.
Please update to the newest version 0.4.3, this should be fixed :)
from opensim.
Related Issues (20)
- Add button to refresh simulators or refresh automatically after simulator reset.
- tvOS simulator support ~ HOT 1
- Latest version binary download crashes when launching with "unexpectedly found nil while unwrapping an Optional value" HOT 4
- make simulator not responding when using Xcode 9 beta 2 HOT 3
- 10.13 Beta Xcode8/9不工作 HOT 8
- ios11 模拟器的问题 HOT 1
- "Copy Sandbox Path to Pasteboard" not working HOT 1
- Can't see iOS 11 simulators in OpenSim HOT 27
- macOS Mojave & XCode10 Support HOT 1
- new build 0.4.0 not available through brew cask? HOT 2
- XCode 10.1 not supported -> isAvailable HOT 10
- Ver 0.4.1 uses too much CPU HOT 15
- OpenSim don't show anything HOT 5
- No simulators found on macOS Catalina beta (Xcode10/11) HOT 3
- hi, 能不能加个小功能呢? HOT 2
- XCode 11 HOT 7
- Feature request: notification/auto update when there is a new release
- Update Install with Homebrew Cask HOT 1
- groupContainer folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensim.