This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// A property wrapper type that instantiates an observable object. | |
/// | |
/// This is a wrapper for `State` that works with `Observable` values and provides "lazy" initialization semantics similar to `StateObject`. | |
@MainActor @propertyWrapper | |
struct LazyState<Value: Observable & AnyObject>: @preconcurrency DynamicProperty { | |
var wrappedValue: Value { | |
guard let value = storage.value else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# What is this for? | |
# This script fixes an issue appeared for some Xcode users where it would show long identifiers | |
# in the list of simulators instead of usual short names. This is caused by duplicate simulators | |
# being sometimes created after switching between Xcode versions, with the same | |
# device type + runtime pair occurring more than once in your list of available simulators. | |
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers. | |
# | |
# What it does? |