Skip to content

Instantly share code, notes, and snippets.

Screenshot

  • Active

image

  • Inactive

image

struct to get information about a file using FileAttributeKey

import Foundation

struct FileAttributesManager {
    
    // MARK: - Error Define
    
    enum FileAttributesError: Error {
import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Text("Lorem").horizontalAlignment(.leading)
                .background(.red.opacity(0.1))
            Text("Lorem").horizontalAlignment(.center)
                .background(.green.opacity(0.1))

概要

  • やりたいことは、コマンドをasyncで非同期に呼び出せるようすること。
    • バックグラウンドで処理を実行させ、キャンセルボタンで処理を中断できるようにする

image

問題点

  • 問題として、xcodebuildを行ったときに処理が完了しないが
  • 具体的にはprocess.isRunningfalseにならない