Xcode+Swiftでの、macOSのapp作成時のメモ
macOS Catalina 10.15.2
Xcode 10.2.1 10E1001
Swift 5.0.1
1)どこでもフォルダやファイルをほいほい作れないのはSandbox機能がオフでないから
4)バツボタンで、アプリをクローズする
AppDelegate.swift
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
7)ファインダー/Finder で、指定フォルダを開く
let theWorkspace : NSWorkspace = NSWorkspace.shared
theWorkspace.openFile(folderPATH)
8)メッセージボックスを出す
let alert = NSAlert()
alert.messageText = "メッセージはここ"
alert.runModal()