This file contains 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
```swift | |
public class AccountViewModel: ObservableObject { | |
// swiftlint:disable:next line_length | |
public typealias Services = MilestonesAccountSectionViewModel.Services & ProfileAccountSectionViewModel.Services & ReservationsAccountSectionViewModel.Services & ContactUsAccountSectionViewModel.Services & FooterAccountSectionViewModel.Services & AboutUsAccountSectionViewModel.Services | |
public typealias Context = ProfileAccountSectionViewModel.Context & ReservationsAccountSectionViewModel.Context & FooterAccountSectionViewModel.Context | |
enum Route: Equatable { | |
case milestones(MilestonesAccountSectionViewModel.Route) | |
case profile(ProfileAccountSectionViewModel.Route) | |
case reservations(ReservationsAccountSectionViewModel.Route) |
This file contains 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
#if swift(>=5.5) | |
@available(iOS 15.0, *) | |
struct AnyAsyncIterator<Element>: AsyncIteratorProtocol { | |
private let wrappedNext: () async throws -> Element? | |
init<I: AsyncIteratorProtocol>(_ asyncIterator: I) where I.Element == Element { | |
var asyncIterator = asyncIterator | |
wrappedNext = { try await asyncIterator.next() } | |
} |
This file contains 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 | |
require 'JSON' | |
device_types = JSON.parse `xcrun simctl list -j devicetypes` | |
runtimes = JSON.parse `xcrun simctl list -j runtimes` | |
devices = JSON.parse `xcrun simctl list -j devices` | |
devices['devices'].each do |runtime, runtime_devices| | |
runtime_devices.each do |device| |
This file contains 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 | |
device_types_output = `xcrun simctl list devicetypes` | |
device_types = device_types_output.scan /(.*) \((.*)\)/ | |
runtimes_output = `xcrun simctl list runtimes` | |
runtimes = runtimes_output.scan /(.*) \(.*\) \((com.apple[^)]+)\)$/ | |
devices_output = `xcrun simctl list devices` | |
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/ |