在macOS應用程序中,我使用此代碼在Application Support文件夾中創建一個目錄。如何在Swift中以編程方式獲取應用程序ID?
let directoryURL = appSupportURL.appendingPathComponent("com.myCompany.myApp").appendingPathComponent("Documents")
如何串com.myCompany.myApp斯威夫特編程獲得?
我看到了這個問題,但我不知道如何使用它在我的MacOS斯威夫特應用程序:Access App Identifier Prefix programmatically
如果你使用沙盒,那麼這是一個沒有問題的問題。您的應用程序支持文件夾是您自己的。 – matt