Skip to content

Instantly share code, notes, and snippets.

View treastrain's full-sized avatar
🏠
Learning at home

treastrain / Tanaka Ryoga treastrain

🏠
Learning at home
View GitHub Profile
@treastrain
treastrain / MCBrowserView.swift
Created September 7, 2023 19:00
`MCBrowserView` for using Multipeer Connectivity `MCBrowserViewController` with SwiftUI (iOS 13.0+, macOS 10.15+, Mac Catalyst 13.1+, tvOS 13.0+, visionOS 1.0+)
//
// MCBrowserView.swift
// You can copy and modify this file and use it with free!
//
// Created by treastrain / Tanaka Ryoga on 2023/09/08.
//
import MultipeerConnectivity
import SwiftUI
@treastrain
treastrain / Scipio-CwlCatchException_Package.swift
Created October 16, 2023 13:00
giginet/Scipio の `scipio prepare` を試して、そのままでは失敗になってしまったものたち https://x.com/treastrain/status/1713862218222358645
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "Scipio-CwlCatchException",
platforms: [.iOS(.v15)],
dependencies: [
.package(url: "https://github.com/Quick/Nimble", exact: "12.3.0"),
.package(url: "https://github.com/ashfurrow/Nimble-Snapshots", exact: "9.6.0"),
import SwiftUI
struct ContentView: View {
@StateObject private var object = Object()
var body: some View {
List(object.numbers, id: \.self) { number in
Text("Content \(number)")
}
.refreshable {