The Swift Package Index logo.Swift Package Index

Has it really been five years since Swift Package Index launched? Read our anniversary blog post!

Build Information

Successful build of LCAppSandboxFileKit, reference 1.0.4 (da7ba4), with Swift 6.1 for macOS (SPM) on 17 May 2025 19:05:17 UTC.

Swift 6 data race errors: 2

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

========================================
RunAll
========================================
Builder version: 4.61.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/DevLiuSir/LCAppSandboxFileKit.git
Reference: 1.0.4
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/DevLiuSir/LCAppSandboxFileKit
 * tag               1.0.4      -> FETCH_HEAD
HEAD is now at da7ba40 Update LCAppSandboxFileKit.podspec
Cloned https://github.com/DevLiuSir/LCAppSandboxFileKit.git
Revision (git rev-parse @):
da7ba404dc6b6ba0c3237dbfe5f00c20f885f7d0
SUCCESS checkout https://github.com/DevLiuSir/LCAppSandboxFileKit.git at 1.0.4
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
  "identity": ".resolve-product-dependencies",
  "name": "resolve-dependencies",
  "url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "version": "unspecified",
  "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
  "dependencies": [
    {
      "identity": "lcappsandboxfilekit",
      "name": "LCAppSandboxFileKit",
      "url": "https://github.com/DevLiuSir/LCAppSandboxFileKit.git",
      "version": "unspecified",
      "path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/LCAppSandboxFileKit",
      "dependencies": [
      ]
    }
  ]
}
Fetching https://github.com/DevLiuSir/LCAppSandboxFileKit.git
[1/180] Fetching lcappsandboxfilekit
Fetched https://github.com/DevLiuSir/LCAppSandboxFileKit.git from cache (0.95s)
Creating working copy for https://github.com/DevLiuSir/LCAppSandboxFileKit.git
Working copy of https://github.com/DevLiuSir/LCAppSandboxFileKit.git resolved at 1.0.4 (da7ba40)
warning: '.resolve-product-dependencies': dependency 'lcappsandboxfilekit' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/DevLiuSir/LCAppSandboxFileKit.git
https://github.com/DevLiuSir/LCAppSandboxFileKit.git
{
  "default_localization" : "en",
  "dependencies" : [
  ],
  "manifest_display_name" : "LCAppSandboxFileKit",
  "name" : "LCAppSandboxFileKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "LCAppSandboxFileKit",
      "targets" : [
        "LCAppSandboxFileKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "LCAppSandboxFileKitTests",
      "module_type" : "SwiftTarget",
      "name" : "LCAppSandboxFileKitTests",
      "path" : "Tests/LCAppSandboxFileKitTests",
      "sources" : [
        "LCAppSandboxFileKitTests.swift"
      ],
      "target_dependencies" : [
        "LCAppSandboxFileKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LCAppSandboxFileKit",
      "module_type" : "SwiftTarget",
      "name" : "LCAppSandboxFileKit",
      "path" : "Sources/LCAppSandboxFileKit",
      "product_memberships" : [
        "LCAppSandboxFileKit"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/de.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "de"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/en.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "en"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/es.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "es"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/fr.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "fr"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/it.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "it"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ja.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ja"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ko.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ko"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/pt-PT.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "pt-pt"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ru.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ru"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/zh-Hans.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "zh-hans"
            }
          }
        }
      ],
      "sources" : [
        "LCAppSandboxFileAccess.swift",
        "LCAppSandboxFileKit.swift",
        "LCOpenSavePanelDelegate.swift",
        "LCPersistentAccess.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.10"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/13] Copying LCAppSandboxFileKit.strings
[6/13] Write sources
[7/13] Copying Info.plist
[12/13] Write swift-version-2F0A5646E1D333AE.txt
[14/19] Compiling LCAppSandboxFileKit resource_bundle_accessor.swift
[15/19] Compiling LCAppSandboxFileKit LCPersistentAccess.swift
[16/19] Compiling LCAppSandboxFileKit LCOpenSavePanelDelegate.swift
[17/19] Emitting module LCAppSandboxFileKit
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:77:16: warning: static property 'fileAccess' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 75 |
 76 |     /// 创建一个 LCAppSandboxFileAccess 对象
 77 |     static var fileAccess = LCAppSandboxFileAccess()
    |                |- warning: static property 'fileAccess' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'fileAccess' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'fileAccess' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 78 |
 79 |     // 用于记录当前显示的 NSOpenPanel 实例,用于后续控制(如手动关闭面板)
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileKit.swift:16:23: warning: static property 'standard' is not concurrency-safe because non-'Sendable' type 'LCAppSandboxFileKit' may have shared mutable state; this is an error in the Swift 6 language mode
 11 |
 12 | /// 应用沙盒文件kit
 13 | public class LCAppSandboxFileKit: NSObject {
    |              `- note: class 'LCAppSandboxFileKit' does not conform to the 'Sendable' protocol
 14 |
 15 |     /// 创建一个单例对象,方便在整个应用中使用
 16 |     public static let standard = LCAppSandboxFileKit()
    |                       |- warning: static property 'standard' is not concurrency-safe because non-'Sendable' type 'LCAppSandboxFileKit' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'standard' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 17 |
 18 |     /// 请求访问`指定路径` (一般用于 `/` 根目录)
[18/19] Compiling LCAppSandboxFileKit LCAppSandboxFileAccess.swift
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:77:16: warning: static property 'fileAccess' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 75 |
 76 |     /// 创建一个 LCAppSandboxFileAccess 对象
 77 |     static var fileAccess = LCAppSandboxFileAccess()
    |                |- warning: static property 'fileAccess' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: convert 'fileAccess' to a 'let' constant to make 'Sendable' shared state immutable
    |                |- note: add '@MainActor' to make static property 'fileAccess' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 78 |
 79 |     // 用于记录当前显示的 NSOpenPanel 实例,用于后续控制(如手动关闭面板)
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:121:29: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
119 |         // 显示打开面板
120 |         let displayOpenPanelBlock = {
121 |             let openPanel = NSOpenPanel()
    |                             `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
122 |             openPanel.title = self.title                         // 设置面板窗口的标题
123 |             openPanel.message = self.message                     // 在NSOpenPanel顶部显示的提示文本或说明
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:23:1: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
 21 | @interface NSResponder : NSObject <NSCoding>
 22 |
 23 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
    | |- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSSavePanel'
 24 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
 25 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:122:23: warning: main actor-isolated property 'title' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
120 |         let displayOpenPanelBlock = {
121 |             let openPanel = NSOpenPanel()
122 |             openPanel.title = self.title                         // 设置面板窗口的标题
    |                       `- warning: main actor-isolated property 'title' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
123 |             openPanel.message = self.message                     // 在NSOpenPanel顶部显示的提示文本或说明
124 |             openPanel.prompt = self.panelButtonTitle             // 面板按钮的标题,通常是“授权”
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:131:45: note: mutation of this property is only permitted within the actor
129 |  - Note: The open and save panel does not currently have a titlebar. So the title is not displayed.
130 |  */
131 | @property (null_resettable, copy) NSString *title;
    |                                             `- note: mutation of this property is only permitted within the actor
132 |
133 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:123:23: warning: main actor-isolated property 'message' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
121 |             let openPanel = NSOpenPanel()
122 |             openPanel.title = self.title                         // 设置面板窗口的标题
123 |             openPanel.message = self.message                     // 在NSOpenPanel顶部显示的提示文本或说明
    |                       `- warning: main actor-isolated property 'message' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
124 |             openPanel.prompt = self.panelButtonTitle             // 面板按钮的标题,通常是“授权”
125 |             openPanel.canCreateDirectories = false               // 是否允许用户创建目录。
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:151:45: note: mutation of this property is only permitted within the actor
149 |  `NSSavePanel`/`NSOpenPanel`: Sets and returns the message shown under title of the panel.
150 |  */
151 | @property (null_resettable, copy) NSString *message;
    |                                             `- note: mutation of this property is only permitted within the actor
152 |
153 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:124:23: warning: main actor-isolated property 'prompt' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
122 |             openPanel.title = self.title                         // 设置面板窗口的标题
123 |             openPanel.message = self.message                     // 在NSOpenPanel顶部显示的提示文本或说明
124 |             openPanel.prompt = self.panelButtonTitle             // 面板按钮的标题,通常是“授权”
    |                       `- warning: main actor-isolated property 'prompt' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
125 |             openPanel.canCreateDirectories = false               // 是否允许用户创建目录。
126 |             openPanel.canChooseFiles = false                     // 是否允许用户选择文件
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:125:45: note: mutation of this property is only permitted within the actor
123 |  `NSSavePanel`/`NSOpenPanel`: Sets the text shown on the Open or Save button. If set to an empty string, it will show a localized "Open" for the NSOpenPanel and "Save" for the NSSavePanel. The default value will be the correct localized prompt for the open or save panel, as appropriate.
124 |  */
125 | @property (null_resettable, copy) NSString *prompt;
    |                                             `- note: mutation of this property is only permitted within the actor
126 |
127 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:125:23: warning: main actor-isolated property 'canCreateDirectories' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
123 |             openPanel.message = self.message                     // 在NSOpenPanel顶部显示的提示文本或说明
124 |             openPanel.prompt = self.panelButtonTitle             // 面板按钮的标题,通常是“授权”
125 |             openPanel.canCreateDirectories = false               // 是否允许用户创建目录。
    |                       `- warning: main actor-isolated property 'canCreateDirectories' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
126 |             openPanel.canChooseFiles = false                     // 是否允许用户选择文件
127 |             openPanel.canChooseDirectories = true                // 是否允许用户选择要打开的 文件夹
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:102:16: note: mutation of this property is only permitted within the actor
100 |  `NSSavePanel`/`NSOpenPanel`: Set to `YES` to show the "New Folder" button. Default is `YES`.
101 |  */
102 | @property BOOL canCreateDirectories;
    |                `- note: mutation of this property is only permitted within the actor
103 |
104 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:126:23: warning: main actor-isolated property 'canChooseFiles' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
124 |             openPanel.prompt = self.panelButtonTitle             // 面板按钮的标题,通常是“授权”
125 |             openPanel.canCreateDirectories = false               // 是否允许用户创建目录。
126 |             openPanel.canChooseFiles = false                     // 是否允许用户选择文件
    |                       `- warning: main actor-isolated property 'canChooseFiles' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
127 |             openPanel.canChooseDirectories = true                // 是否允许用户选择要打开的 文件夹
128 |             openPanel.allowsMultipleSelection = false            // 不允许用户多选,只能选择一个目录
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h:32:16: note: mutation of this property is only permitted within the actor
30 | @property BOOL allowsMultipleSelection;
31 |
32 | @property BOOL canChooseFiles;
   |                `- note: mutation of this property is only permitted within the actor
33 |
34 | /* Controls how the receiver responds to ubiquitous documents with conflicting versions. If YES, then when the user attempts to open one or more documents with conflicts, the receiver will first display conflict resolution UI, requiring the user to resolve those conflicts before the documents can be opened. If NO, then the receiver does nothing in response to conflicts, allowing your application to handle them. The default value is YES, except for applications linked against the 10.9 SDK or earlier that have adopted iCloud by specifying a ubiquitous container identifier entitlement.
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:127:23: warning: main actor-isolated property 'canChooseDirectories' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
125 |             openPanel.canCreateDirectories = false               // 是否允许用户创建目录。
126 |             openPanel.canChooseFiles = false                     // 是否允许用户选择文件
127 |             openPanel.canChooseDirectories = true                // 是否允许用户选择要打开的 文件夹
    |                       `- warning: main actor-isolated property 'canChooseDirectories' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
128 |             openPanel.allowsMultipleSelection = false            // 不允许用户多选,只能选择一个目录
129 |             openPanel.showsHiddenFiles = false                   // 不显示隐藏文件和目录
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h:28:16: note: mutation of this property is only permitted within the actor
26 | @property BOOL resolvesAliases;
27 |
28 | @property BOOL canChooseDirectories;
   |                `- note: mutation of this property is only permitted within the actor
29 |
30 | @property BOOL allowsMultipleSelection;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:128:23: warning: main actor-isolated property 'allowsMultipleSelection' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
126 |             openPanel.canChooseFiles = false                     // 是否允许用户选择文件
127 |             openPanel.canChooseDirectories = true                // 是否允许用户选择要打开的 文件夹
128 |             openPanel.allowsMultipleSelection = false            // 不允许用户多选,只能选择一个目录
    |                       `- warning: main actor-isolated property 'allowsMultipleSelection' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
129 |             openPanel.showsHiddenFiles = false                   // 不显示隐藏文件和目录
130 |             openPanel.isExtensionHidden = false                  // 显示文件扩展名(虽然这里只选择目录,也适用)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h:30:16: note: mutation of this property is only permitted within the actor
28 | @property BOOL canChooseDirectories;
29 |
30 | @property BOOL allowsMultipleSelection;
   |                `- note: mutation of this property is only permitted within the actor
31 |
32 | @property BOOL canChooseFiles;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:129:23: warning: main actor-isolated property 'showsHiddenFiles' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
127 |             openPanel.canChooseDirectories = true                // 是否允许用户选择要打开的 文件夹
128 |             openPanel.allowsMultipleSelection = false            // 不允许用户多选,只能选择一个目录
129 |             openPanel.showsHiddenFiles = false                   // 不显示隐藏文件和目录
    |                       `- warning: main actor-isolated property 'showsHiddenFiles' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
130 |             openPanel.isExtensionHidden = false                  // 显示文件扩展名(虽然这里只选择目录,也适用)
131 |             openPanel.isAccessoryViewDisclosed = true            // 展开附加视图(如果有 accessoryView 的话)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:156:16: note: mutation of this property is only permitted within the actor
154 |  `NSSavePanel`/`NSOpenPanel`: If `showsHiddenFiles` is set to `YES`, files that are normally hidden from the user are displayed. This method was published in Mac OS 10.6, but has existed since Mac OS 10.4. This property is KVO compliant. The user may invoke the keyboard shortcut (cmd-shift-.) to show or hide hidden files. Any user interface shown in an an accessory view should be updated by using key value observing (KVO) to watch for changes of this property. Alternatively, the user interface can be directly bound to this property. The default value is `NO`.
155 |  */
156 | @property BOOL showsHiddenFiles;
    |                `- note: mutation of this property is only permitted within the actor
157 |
158 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:130:23: warning: main actor-isolated property 'isExtensionHidden' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
128 |             openPanel.allowsMultipleSelection = false            // 不允许用户多选,只能选择一个目录
129 |             openPanel.showsHiddenFiles = false                   // 不显示隐藏文件和目录
130 |             openPanel.isExtensionHidden = false                  // 显示文件扩展名(虽然这里只选择目录,也适用)
    |                       `- warning: main actor-isolated property 'isExtensionHidden' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
131 |             openPanel.isAccessoryViewDisclosed = true            // 展开附加视图(如果有 accessoryView 的话)
132 |             openPanel.directoryURL = updatedURL                  // 设置默认打开的目录路径
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:115:43: note: mutation of this property is only permitted within the actor
113 |  `NSOpenPanel`: Not used.
114 | */
115 | @property (getter=isExtensionHidden) BOOL extensionHidden;
    |                                           `- note: mutation of this property is only permitted within the actor
116 |
117 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:131:23: warning: main actor-isolated property 'isAccessoryViewDisclosed' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
129 |             openPanel.showsHiddenFiles = false                   // 不显示隐藏文件和目录
130 |             openPanel.isExtensionHidden = false                  // 显示文件扩展名(虽然这里只选择目录,也适用)
131 |             openPanel.isAccessoryViewDisclosed = true            // 展开附加视图(如果有 accessoryView 的话)
    |                       `- warning: main actor-isolated property 'isAccessoryViewDisclosed' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
132 |             openPanel.directoryURL = updatedURL                  // 设置默认打开的目录路径
133 |             openPanel.delegate = openPanelDelegate               // 设置面板的代理对象,用于自定义行为
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h:49:50: note: mutation of this property is only permitted within the actor
47 | /* Gets and sets the disclosure state of an accessory view in an NSOpenPanel. If hiding / disclosing an accessory view is not applicable this property will behave like a read only property. */
48 |
49 | @property (getter=isAccessoryViewDisclosed) BOOL accessoryViewDisclosed API_AVAILABLE(macos(10.11));
   |                                                  `- note: mutation of this property is only permitted within the actor
50 |
51 | @end
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:132:23: warning: main actor-isolated property 'directoryURL' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
130 |             openPanel.isExtensionHidden = false                  // 显示文件扩展名(虽然这里只选择目录,也适用)
131 |             openPanel.isAccessoryViewDisclosed = true            // 展开附加视图(如果有 accessoryView 的话)
132 |             openPanel.directoryURL = updatedURL                  // 设置默认打开的目录路径
    |                       `- warning: main actor-isolated property 'directoryURL' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
133 |             openPanel.delegate = openPanelDelegate               // 设置面板的代理对象,用于自定义行为
134 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:56:35: note: mutation of this property is only permitted within the actor
 54 |  - Note: Can only be set during the configuration phase.
 55 |  */
 56 | @property (nullable, copy) NSURL *directoryURL API_AVAILABLE(macos(10.6));
    |                                   `- note: mutation of this property is only permitted within the actor
 57 |
 58 | /**
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:133:23: warning: main actor-isolated property 'delegate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
131 |             openPanel.isAccessoryViewDisclosed = true            // 展开附加视图(如果有 accessoryView 的话)
132 |             openPanel.directoryURL = updatedURL                  // 设置默认打开的目录路径
133 |             openPanel.delegate = openPanelDelegate               // 设置面板的代理对象,用于自定义行为
    |                       `- warning: main actor-isolated property 'delegate' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
134 |
135 |             self.currentOpenPanel = openPanel                    // 保存当前打开的 NSOpenPanel 引用,以便后续操作(如关闭面板)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:88:56: note: mutation of this property is only permitted within the actor
 86 |  `NSSavePanel`/`NSOpenPanel`: Sets and returns the delegate.
 87 |  */
 88 | @property (nullable, weak) id<NSOpenSavePanelDelegate> delegate;
    |                                                        `- note: mutation of this property is only permitted within the actor
 89 |
 90 | #pragma clang diagnostic pop
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:139:27: warning: main actor-isolated property 'accessoryView' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
137 |             // 如果当前路径不是根目录,并且允许显示根目录授权选项,则为打开面板添加附件视图
138 |             if url.path != "/" && self.isRootOptionEnabled {
139 |                 openPanel.accessoryView = self.createRootAuthAccessoryView()
    |                           `- warning: main actor-isolated property 'accessoryView' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
140 |                 openPanel.isAccessoryViewDisclosed = true
141 |             }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:80:38: note: mutation of this property is only permitted within the actor
 78 |  Sets and returns the accessory view shown in the panel. For applications that link on SnowLeopard and higher, the accessoryView's frame will be observed, and any changes the programmer makes to the frame will automatically be reflected in the panel (including animated changes to the frame height).
 79 |  */
 80 | @property (nullable, strong) NSView *accessoryView;
    |                                      `- note: mutation of this property is only permitted within the actor
 81 |
 82 | #pragma clang diagnostic push
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:140:27: warning: main actor-isolated property 'isAccessoryViewDisclosed' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
138 |             if url.path != "/" && self.isRootOptionEnabled {
139 |                 openPanel.accessoryView = self.createRootAuthAccessoryView()
140 |                 openPanel.isAccessoryViewDisclosed = true
    |                           `- warning: main actor-isolated property 'isAccessoryViewDisclosed' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
141 |             }
142 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSOpenPanel.h:49:50: note: mutation of this property is only permitted within the actor
47 | /* Gets and sets the disclosure state of an accessory view in an NSOpenPanel. If hiding / disclosing an accessory view is not applicable this property will behave like a read only property. */
48 |
49 | @property (getter=isAccessoryViewDisclosed) BOOL accessoryViewDisclosed API_AVAILABLE(macos(10.11));
   |                                                  `- note: mutation of this property is only permitted within the actor
50 |
51 | @end
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:143:19: warning: call to main actor-isolated instance method 'activate(ignoringOtherApps:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
141 |             }
142 |
143 |             NSApp.activate(ignoringOtherApps: true)
    |                   `- warning: call to main actor-isolated instance method 'activate(ignoringOtherApps:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
144 |
145 |             // 用户选择了文件夹后,更新allowedURL
AppKit.NSApplication.activate:3:24: note: calls to instance method 'activate(ignoringOtherApps:)' from outside of its actor context are implicitly asynchronous
1 | class NSApplication {
2 | @available(macOS, introduced: 10.0, deprecated: 100000, message: "This method will be deprecated in a future release. Use NSApp.activate instead.")
3 |   @MainActor open func activate(ignoringOtherApps ignoreOtherApps: Bool)}
  |                        |- note: calls to instance method 'activate(ignoringOtherApps:)' from outside of its actor context are implicitly asynchronous
  |                        `- note: main actor isolation inferred from inheritance from class 'NSResponder'
4 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:143:13: warning: main actor-isolated var 'NSApp' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
141 |             }
142 |
143 |             NSApp.activate(ignoringOtherApps: true)
    |             `- warning: main actor-isolated var 'NSApp' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
144 |
145 |             // 用户选择了文件夹后,更新allowedURL
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:191:58: note: var declared here
189 | @interface NSApplication : NSResponder <NSUserInterfaceValidations, NSMenuItemValidation, NSAccessibilityElement, NSAccessibility>
190 |
191 | APPKIT_EXTERN __kindof NSApplication * _Null_unspecified NSApp NS_SWIFT_UI_ACTOR;
    |                                                          `- note: var declared here
192 |
193 | @property (class, readonly, strong) __kindof NSApplication *sharedApplication;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:146:26: warning: call to main actor-isolated instance method 'runModal()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
144 |
145 |             // 用户选择了文件夹后,更新allowedURL
146 |             if openPanel.runModal() == NSApplication.ModalResponse.OK {
    |                          `- warning: call to main actor-isolated instance method 'runModal()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
147 |                 allowedURL = openPanel.url
148 |             }
AppKit.NSSavePanel.runModal:2:22: note: calls to instance method 'runModal()' from outside of its actor context are implicitly asynchronous
1 | class NSSavePanel {
2 | @MainActor open func runModal() -> NSApplication.ModalResponse}
  |                      |- note: calls to instance method 'runModal()' from outside of its actor context are implicitly asynchronous
  |                      `- note: main actor isolation inferred from inheritance from class 'NSPanel'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:147:40: warning: main actor-isolated property 'url' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
145 |             // 用户选择了文件夹后,更新allowedURL
146 |             if openPanel.runModal() == NSApplication.ModalResponse.OK {
147 |                 allowedURL = openPanel.url
    |                                        `- warning: main actor-isolated property 'url' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
148 |             }
149 |         }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSavePanel.h:39:45: note: property declared here
 37 |  `NSOpenPanel`: Returns the single filename selected by the user. Note: if -allowsMultipleSelection is set, you should use the -URLs on NSOpenPanel instead.
 38 |  */
 39 | @property (nullable, readonly, copy) NSURL *URL;
    |                                             `- note: property declared here
 40 |
 41 | // MARK: - Configuration Properties
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:395:31: warning: call to main actor-isolated initializer 'init(title:target:action:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    |                               `- warning: call to main actor-isolated initializer 'init(title:target:action:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
396 |                                        target: self,
397 |                                        action: #selector(self.authRootPath))
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSButton.h:40:1: note: calls to initializer 'init(title:target:action:)' from outside of its actor context are implicitly asynchronous
 38 |  @return An initialized button object.
 39 |  */
 40 | + (instancetype)buttonWithTitle:(NSString *)title target:(nullable id)target action:(nullable SEL)action API_AVAILABLE(macos(10.12));
    | |- note: calls to initializer 'init(title:target:action:)' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSControl'
 41 |
 42 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:398:25: warning: main actor-isolated property 'bezelColor' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
396 |                                        target: self,
397 |                                        action: #selector(self.authRootPath))
398 |         authorizeButton.bezelColor = .controlAccentColor
    |                         `- warning: main actor-isolated property 'bezelColor' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
399 |         authorizeButton.translatesAutoresizingMaskIntoConstraints = false
400 |         // 创建标签
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSButton.h:117:37: note: mutation of this property is only permitted within the actor
115 |
116 | /*! Applies a custom color to the button's bezel, in appearances that support it. A nil value indicates an unmodified button appearance. The default value is nil. */
117 | @property (nullable, copy) NSColor *bezelColor API_AVAILABLE(macos(10.12.2));
    |                                     `- note: mutation of this property is only permitted within the actor
118 |
119 | /*! Applies a tint color to template image and text content, in combination with other theme-appropriate effects. Only applicable to borderless buttons. A nil value indicates the standard set of effects without color modification. The default value is nil. Non-template images and attributed string values are not affected by the contentTintColor. */
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:399:25: warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
397 |                                        action: #selector(self.authRootPath))
398 |         authorizeButton.bezelColor = .controlAccentColor
399 |         authorizeButton.translatesAutoresizingMaskIntoConstraints = false
    |                         `- warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
400 |         // 创建标签
401 |         let descriptionLabel = NSTextField(wrappingLabelWithString:
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:276:16: note: mutation of this property is only permitted within the actor
274 | /* by default, the autoresizing mask on a view gives rise to constraints that fully determine the view's position.  To do anything interesting with constraints, you need to turn that off. IB will turn it off.
275 |  */
276 | @property BOOL translatesAutoresizingMaskIntoConstraints API_AVAILABLE(macos(10.7));
    |                `- note: mutation of this property is only permitted within the actor
277 |
278 | /* constraint based layout engages lazily when someone tries to use it.  If you do all of your constraint set up in -updateConstraints, you might never even receive updateConstraints if no one makes a constraint.  To fix this chicken and egg problem, override this method to return YES if your view needs the window to use constraint based layout.
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:401:32: warning: call to main actor-isolated initializer 'init(wrappingLabelWithString:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
399 |         authorizeButton.translatesAutoresizingMaskIntoConstraints = false
400 |         // 创建标签
401 |         let descriptionLabel = NSTextField(wrappingLabelWithString:
    |                                `- warning: call to main actor-isolated initializer 'init(wrappingLabelWithString:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
402 |                                             String(format: LCFileAccessLocalizeString("auth_root_dir_msg"), KApplicationName))
403 |         descriptionLabel.isEditable = false
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h:86:1: note: calls to initializer 'init(wrappingLabelWithString:)' from outside of its actor context are implicitly asynchronous
 84 |  @return An initialized text field object.
 85 |  */
 86 | + (instancetype)wrappingLabelWithString:(NSString *)stringValue API_AVAILABLE(macos(10.12));
    | |- note: calls to initializer 'init(wrappingLabelWithString:)' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSControl'
 87 |
 88 | /*!
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:403:26: warning: main actor-isolated property 'isEditable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
401 |         let descriptionLabel = NSTextField(wrappingLabelWithString:
402 |                                             String(format: LCFileAccessLocalizeString("auth_root_dir_msg"), KApplicationName))
403 |         descriptionLabel.isEditable = false
    |                          `- warning: main actor-isolated property 'isEditable' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
404 |         descriptionLabel.isBordered = false
405 |         descriptionLabel.backgroundColor = .clear
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h:30:36: note: mutation of this property is only permitted within the actor
 28 | @property (getter=isBordered) BOOL bordered;
 29 | @property (getter=isBezeled) BOOL bezeled;
 30 | @property (getter=isEditable) BOOL editable;
    |                                    `- note: mutation of this property is only permitted within the actor
 31 | @property (getter=isSelectable) BOOL selectable;
 32 | - (void)selectText:(nullable id)sender;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:404:26: warning: main actor-isolated property 'isBordered' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
402 |                                             String(format: LCFileAccessLocalizeString("auth_root_dir_msg"), KApplicationName))
403 |         descriptionLabel.isEditable = false
404 |         descriptionLabel.isBordered = false
    |                          `- warning: main actor-isolated property 'isBordered' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
405 |         descriptionLabel.backgroundColor = .clear
406 |         descriptionLabel.translatesAutoresizingMaskIntoConstraints = false
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h:28:36: note: mutation of this property is only permitted within the actor
 26 | @property BOOL drawsBackground;
 27 | @property (nullable, copy) NSColor *textColor;
 28 | @property (getter=isBordered) BOOL bordered;
    |                                    `- note: mutation of this property is only permitted within the actor
 29 | @property (getter=isBezeled) BOOL bezeled;
 30 | @property (getter=isEditable) BOOL editable;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:405:26: warning: main actor-isolated property 'backgroundColor' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
403 |         descriptionLabel.isEditable = false
404 |         descriptionLabel.isBordered = false
405 |         descriptionLabel.backgroundColor = .clear
    |                          `- warning: main actor-isolated property 'backgroundColor' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
406 |         descriptionLabel.translatesAutoresizingMaskIntoConstraints = false
407 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h:25:37: note: mutation of this property is only permitted within the actor
 23 | @property (nullable, copy) NSAttributedString *placeholderAttributedString API_AVAILABLE(macos(10.10));
 24 |
 25 | @property (nullable, copy) NSColor *backgroundColor;
    |                                     `- note: mutation of this property is only permitted within the actor
 26 | @property BOOL drawsBackground;
 27 | @property (nullable, copy) NSColor *textColor;
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:406:26: warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
404 |         descriptionLabel.isBordered = false
405 |         descriptionLabel.backgroundColor = .clear
406 |         descriptionLabel.translatesAutoresizingMaskIntoConstraints = false
    |                          `- warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
407 |
408 |         // 创建 accessory 容器视图
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:276:16: note: mutation of this property is only permitted within the actor
274 | /* by default, the autoresizing mask on a view gives rise to constraints that fully determine the view's position.  To do anything interesting with constraints, you need to turn that off. IB will turn it off.
275 |  */
276 | @property BOOL translatesAutoresizingMaskIntoConstraints API_AVAILABLE(macos(10.7));
    |                `- note: mutation of this property is only permitted within the actor
277 |
278 | /* constraint based layout engages lazily when someone tries to use it.  If you do all of your constraint set up in -updateConstraints, you might never even receive updateConstraints if no one makes a constraint.  To fix this chicken and egg problem, override this method to return YES if your view needs the window to use constraint based layout.
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:409:29: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
407 |
408 |         // 创建 accessory 容器视图
409 |         let accessoryView = NSView()
    |                             `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
410 |         accessoryView.translatesAutoresizingMaskIntoConstraints = false
411 |         accessoryView.addSubview(authorizeButton)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:23:1: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
 21 | @interface NSResponder : NSObject <NSCoding>
 22 |
 23 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
    | |- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
    | `- note: main actor isolation inferred from inheritance from class 'NSResponder'
 24 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
 25 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:410:23: warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
408 |         // 创建 accessory 容器视图
409 |         let accessoryView = NSView()
410 |         accessoryView.translatesAutoresizingMaskIntoConstraints = false
    |                       `- warning: main actor-isolated property 'translatesAutoresizingMaskIntoConstraints' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
411 |         accessoryView.addSubview(authorizeButton)
412 |         accessoryView.addSubview(descriptionLabel)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:276:16: note: mutation of this property is only permitted within the actor
274 | /* by default, the autoresizing mask on a view gives rise to constraints that fully determine the view's position.  To do anything interesting with constraints, you need to turn that off. IB will turn it off.
275 |  */
276 | @property BOOL translatesAutoresizingMaskIntoConstraints API_AVAILABLE(macos(10.7));
    |                `- note: mutation of this property is only permitted within the actor
277 |
278 | /* constraint based layout engages lazily when someone tries to use it.  If you do all of your constraint set up in -updateConstraints, you might never even receive updateConstraints if no one makes a constraint.  To fix this chicken and egg problem, override this method to return YES if your view needs the window to use constraint based layout.
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:411:23: warning: call to main actor-isolated instance method 'addSubview' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
409 |         let accessoryView = NSView()
410 |         accessoryView.translatesAutoresizingMaskIntoConstraints = false
411 |         accessoryView.addSubview(authorizeButton)
    |                       `- warning: call to main actor-isolated instance method 'addSubview' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
412 |         accessoryView.addSubview(descriptionLabel)
413 |
AppKit.NSView.addSubview:2:22: note: calls to instance method 'addSubview' from outside of its actor context are implicitly asynchronous
1 | class NSView {
2 | @MainActor open func addSubview(_ view: NSView)}
  |                      |- note: calls to instance method 'addSubview' from outside of its actor context are implicitly asynchronous
  |                      `- note: main actor isolation inferred from inheritance from class 'NSResponder'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:412:23: warning: call to main actor-isolated instance method 'addSubview' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
410 |         accessoryView.translatesAutoresizingMaskIntoConstraints = false
411 |         accessoryView.addSubview(authorizeButton)
412 |         accessoryView.addSubview(descriptionLabel)
    |                       `- warning: call to main actor-isolated instance method 'addSubview' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
413 |
414 |         // 设置布局约束
AppKit.NSView.addSubview:2:22: note: calls to instance method 'addSubview' from outside of its actor context are implicitly asynchronous
1 | class NSView {
2 | @MainActor open func addSubview(_ view: NSView)}
  |                      |- note: calls to instance method 'addSubview' from outside of its actor context are implicitly asynchronous
  |                      `- note: main actor isolation inferred from inheritance from class 'NSResponder'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:417:29: warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
415 |         NSLayoutConstraint.activate([
416 |             // 授权按钮靠左
417 |             authorizeButton.leadingAnchor.constraint(equalTo: accessoryView.leadingAnchor, constant: 20),
    |                             `- warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
418 |             authorizeButton.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
419 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:224:51: note: property declared here
222 |  See NSLayoutAnchor.h for more details.
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:417:77: warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
415 |         NSLayoutConstraint.activate([
416 |             // 授权按钮靠左
417 |             authorizeButton.leadingAnchor.constraint(equalTo: accessoryView.leadingAnchor, constant: 20),
    |                                                                             `- warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
418 |             authorizeButton.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
419 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:224:51: note: property declared here
222 |  See NSLayoutAnchor.h for more details.
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:418:29: warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
416 |             // 授权按钮靠左
417 |             authorizeButton.leadingAnchor.constraint(equalTo: accessoryView.leadingAnchor, constant: 20),
418 |             authorizeButton.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
    |                             `- warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
419 |
420 |             // 标签位于按钮右侧
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:233:51: note: property declared here
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
232 | @property (readonly, strong) NSLayoutXAxisAnchor *centerXAnchor API_AVAILABLE(macos(10.11));
233 | @property (readonly, strong) NSLayoutYAxisAnchor *centerYAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
234 | @property (readonly, strong) NSLayoutYAxisAnchor *firstBaselineAnchor API_AVAILABLE(macos(10.11));
235 | @property (readonly, strong) NSLayoutYAxisAnchor *lastBaselineAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:418:77: warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
416 |             // 授权按钮靠左
417 |             authorizeButton.leadingAnchor.constraint(equalTo: accessoryView.leadingAnchor, constant: 20),
418 |             authorizeButton.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
    |                                                                             `- warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
419 |
420 |             // 标签位于按钮右侧
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:233:51: note: property declared here
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
232 | @property (readonly, strong) NSLayoutXAxisAnchor *centerXAnchor API_AVAILABLE(macos(10.11));
233 | @property (readonly, strong) NSLayoutYAxisAnchor *centerYAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
234 | @property (readonly, strong) NSLayoutYAxisAnchor *firstBaselineAnchor API_AVAILABLE(macos(10.11));
235 | @property (readonly, strong) NSLayoutYAxisAnchor *lastBaselineAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:421:30: warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
419 |
420 |             // 标签位于按钮右侧
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
    |                              `- warning: main actor-isolated property 'leadingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:224:51: note: property declared here
222 |  See NSLayoutAnchor.h for more details.
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:421:80: warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
419 |
420 |             // 标签位于按钮右侧
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
    |                                                                                `- warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:225:51: note: property declared here
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:422:30: warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
420 |             // 标签位于按钮右侧
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
    |                              `- warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
424 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:225:51: note: property declared here
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:422:89: warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
420 |             // 标签位于按钮右侧
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
    |                                                                                         `- warning: main actor-isolated property 'trailingAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
424 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:225:51: note: property declared here
223 |  */
224 | @property (readonly, strong) NSLayoutXAxisAnchor *leadingAnchor API_AVAILABLE(macos(10.11));
225 | @property (readonly, strong) NSLayoutXAxisAnchor *trailingAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
226 | @property (readonly, strong) NSLayoutXAxisAnchor *leftAnchor API_AVAILABLE(macos(10.11));
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:423:30: warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
    |                              `- warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
424 |
425 |             // 设置底部约束撑开 accessoryView 的高度
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:233:51: note: property declared here
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
232 | @property (readonly, strong) NSLayoutXAxisAnchor *centerXAnchor API_AVAILABLE(macos(10.11));
233 | @property (readonly, strong) NSLayoutYAxisAnchor *centerYAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
234 | @property (readonly, strong) NSLayoutYAxisAnchor *firstBaselineAnchor API_AVAILABLE(macos(10.11));
235 | @property (readonly, strong) NSLayoutYAxisAnchor *lastBaselineAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:423:78: warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
421 |             descriptionLabel.leadingAnchor.constraint(equalTo: authorizeButton.trailingAnchor, constant: 10),
422 |             descriptionLabel.trailingAnchor.constraint(lessThanOrEqualTo: accessoryView.trailingAnchor, constant: -12),
423 |             descriptionLabel.centerYAnchor.constraint(equalTo: accessoryView.centerYAnchor),
    |                                                                              `- warning: main actor-isolated property 'centerYAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
424 |
425 |             // 设置底部约束撑开 accessoryView 的高度
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:233:51: note: property declared here
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
232 | @property (readonly, strong) NSLayoutXAxisAnchor *centerXAnchor API_AVAILABLE(macos(10.11));
233 | @property (readonly, strong) NSLayoutYAxisAnchor *centerYAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
234 | @property (readonly, strong) NSLayoutYAxisAnchor *firstBaselineAnchor API_AVAILABLE(macos(10.11));
235 | @property (readonly, strong) NSLayoutYAxisAnchor *lastBaselineAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:426:30: warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
424 |
425 |             // 设置底部约束撑开 accessoryView 的高度
426 |             descriptionLabel.bottomAnchor.constraint(equalTo: accessoryView.bottomAnchor, constant: -12),
    |                              `- warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
427 |             // 最小宽度防止过窄
428 |             accessoryView.widthAnchor.constraint(greaterThanOrEqualToConstant: 300)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:229:51: note: property declared here
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:426:77: warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
424 |
425 |             // 设置底部约束撑开 accessoryView 的高度
426 |             descriptionLabel.bottomAnchor.constraint(equalTo: accessoryView.bottomAnchor, constant: -12),
    |                                                                             `- warning: main actor-isolated property 'bottomAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
427 |             // 最小宽度防止过窄
428 |             accessoryView.widthAnchor.constraint(greaterThanOrEqualToConstant: 300)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:229:51: note: property declared here
227 | @property (readonly, strong) NSLayoutXAxisAnchor *rightAnchor API_AVAILABLE(macos(10.11));
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
    |                                                   `- note: property declared here
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:428:27: warning: main actor-isolated property 'widthAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
391 |
392 |     /// 创建用于`授权根目录`的 附件面板,包含一个按钮和一段提示信息
393 |     private func createRootAuthAccessoryView() -> NSView {
    |                  `- note: add '@MainActor' to make instance method 'createRootAuthAccessoryView()' part of global actor 'MainActor'
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    :
426 |             descriptionLabel.bottomAnchor.constraint(equalTo: accessoryView.bottomAnchor, constant: -12),
427 |             // 最小宽度防止过窄
428 |             accessoryView.widthAnchor.constraint(greaterThanOrEqualToConstant: 300)
    |                           `- warning: main actor-isolated property 'widthAnchor' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
429 |         ])
430 |         return accessoryView
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSLayoutConstraint.h:230:49: note: property declared here
228 | @property (readonly, strong) NSLayoutYAxisAnchor *topAnchor API_AVAILABLE(macos(10.11));
229 | @property (readonly, strong) NSLayoutYAxisAnchor *bottomAnchor API_AVAILABLE(macos(10.11));
230 | @property (readonly, strong) NSLayoutDimension *widthAnchor API_AVAILABLE(macos(10.11));
    |                                                 `- note: property declared here
231 | @property (readonly, strong) NSLayoutDimension *heightAnchor API_AVAILABLE(macos(10.11));
232 | @property (readonly, strong) NSLayoutXAxisAnchor *centerXAnchor API_AVAILABLE(macos(10.11));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:435:13: warning: main actor-isolated property 'isEnabled' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
432 |
433 |     /// 根目录授权按钮点击
434 |     @objc private func authRootPath(_ btn: NSButton) {
    |                        `- note: add '@MainActor' to make instance method 'authRootPath' part of global actor 'MainActor'
435 |         btn.isEnabled = false
    |             `- warning: main actor-isolated property 'isEnabled' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
436 |         // 1.关闭已打开的面板
437 |         self.currentOpenPanel?.close()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSControl.h:29:35: note: mutation of this property is only permitted within the actor
 27 | @property BOOL ignoresMultiClick;
 28 | @property (getter=isContinuous) BOOL continuous;
 29 | @property (getter=isEnabled) BOOL enabled;
    |                                   `- note: mutation of this property is only permitted within the actor
 30 | @property BOOL refusesFirstResponder;
 31 | @property (getter=isHighlighted) BOOL highlighted API_AVAILABLE(macos(10.10));
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:437:32: warning: call to main actor-isolated instance method 'close()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
432 |
433 |     /// 根目录授权按钮点击
434 |     @objc private func authRootPath(_ btn: NSButton) {
    |                        `- note: add '@MainActor' to make instance method 'authRootPath' part of global actor 'MainActor'
435 |         btn.isEnabled = false
436 |         // 1.关闭已打开的面板
437 |         self.currentOpenPanel?.close()
    |                                `- warning: call to main actor-isolated instance method 'close()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
438 |         // 2.重新请求根目录,打开面板
439 |         DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [self] in
AppKit.NSWindow.close:2:22: note: calls to instance method 'close()' from outside of its actor context are implicitly asynchronous
1 | class NSWindow {
2 | @MainActor open func close()}
  |                      |- note: calls to instance method 'close()' from outside of its actor context are implicitly asynchronous
  |                      `- note: main actor isolation inferred from inheritance from class 'NSResponder'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:395:31: warning: sending value of non-Sendable type 'LCAppSandboxFileAccess' risks causing data races; this is an error in the Swift 6 language mode
393 |     private func createRootAuthAccessoryView() -> NSView {
394 |         // 创建按钮
395 |         let authorizeButton = NSButton(title: LCFileAccessLocalizeString("auth_root_dir"),
    |                               |- warning: sending value of non-Sendable type 'LCAppSandboxFileAccess' risks causing data races; this is an error in the Swift 6 language mode
    |                               `- note: sending task-isolated value of non-Sendable type 'LCAppSandboxFileAccess' to main actor-isolated initializer 'init(title:target:action:)' risks causing races in between task-isolated and main actor-isolated uses
396 |                                        target: self,
397 |                                        action: #selector(self.authRootPath))
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileAccess.swift:441:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
439 |         DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [self] in
440 |             // 尝试访问根目录路径”/“,并在成功时调用回调
441 |             _ = accessFilePath("/", persistPermission: true) {
    |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
442 |                 // 成功获取权限
443 |                 print("已成功获取‘根目录’的访问权限")
[19/19] Compiling LCAppSandboxFileKit LCAppSandboxFileKit.swift
/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/LCAppSandboxFileKit.swift:16:23: warning: static property 'standard' is not concurrency-safe because non-'Sendable' type 'LCAppSandboxFileKit' may have shared mutable state; this is an error in the Swift 6 language mode
 11 |
 12 | /// 应用沙盒文件kit
 13 | public class LCAppSandboxFileKit: NSObject {
    |              `- note: class 'LCAppSandboxFileKit' does not conform to the 'Sendable' protocol
 14 |
 15 |     /// 创建一个单例对象,方便在整个应用中使用
 16 |     public static let standard = LCAppSandboxFileKit()
    |                       |- warning: static property 'standard' is not concurrency-safe because non-'Sendable' type 'LCAppSandboxFileKit' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'standard' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 17 |
 18 |     /// 请求访问`指定路径` (一般用于 `/` 根目录)
Build complete! (7.20s)
Build complete.
{
  "default_localization" : "en",
  "dependencies" : [
  ],
  "manifest_display_name" : "LCAppSandboxFileKit",
  "name" : "LCAppSandboxFileKit",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "10.15"
    }
  ],
  "products" : [
    {
      "name" : "LCAppSandboxFileKit",
      "targets" : [
        "LCAppSandboxFileKit"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "LCAppSandboxFileKitTests",
      "module_type" : "SwiftTarget",
      "name" : "LCAppSandboxFileKitTests",
      "path" : "Tests/LCAppSandboxFileKitTests",
      "sources" : [
        "LCAppSandboxFileKitTests.swift"
      ],
      "target_dependencies" : [
        "LCAppSandboxFileKit"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LCAppSandboxFileKit",
      "module_type" : "SwiftTarget",
      "name" : "LCAppSandboxFileKit",
      "path" : "Sources/LCAppSandboxFileKit",
      "product_memberships" : [
        "LCAppSandboxFileKit"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/de.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "de"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/en.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "en"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/es.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "es"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/fr.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "fr"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/it.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "it"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ja.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ja"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ko.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ko"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/pt-PT.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "pt-pt"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/ru.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "ru"
            }
          }
        },
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/Sources/LCAppSandboxFileKit/Resources/zh-Hans.lproj/LCAppSandboxFileKit.strings",
          "rule" : {
            "process" : {
              "localization" : "zh-hans"
            }
          }
        }
      ],
      "sources" : [
        "LCAppSandboxFileAccess.swift",
        "LCAppSandboxFileKit.swift",
        "LCOpenSavePanelDelegate.swift",
        "LCPersistentAccess.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.10"
}
Done.