Xcode source editor extension privacy alert runs on each app start
Given macOS Sequoia, each first invocation of the SwiftFormat for Xcode source editor extension (which I love!) causes a permissions alert to appear:
Was looking into this more and it seems like this might be related to something related to the shared app group container name? See https://mjtsai.com/blog/2024/09/11/group-container-names-in-sequoia/ / https://www.goldenhillsoftware.com/2024/06/migration-step-in-next-beta-of-unread-for-macos/
But looking at the source code, the shared app group container ID is com.charcoaldesign.SwiftFormat so I guess this wouldn't apply?
Same here..
You can get rid of this message by providing full disk access:
Does it require full disk access?
It doesn't. It only accesses files you import. I'll take a look at the permissions and see if I can fix the warning
I noticed when running in VS Code via https://github.com/vknabel/vscode-swiftformat there's also a lot of suspicious warnings
Add this to .vscode/extensions.json
{
"recommendations": [
"sswg.swift-lang",
"vknabel.vscode-swiftformat"
]
}
and then add this this to .vscode/settings.json
{
"[swift]": {
"editor.defaultFormatter": "vknabel.vscode-swiftformat",
"editor.formatOnSave": true
}
}
and restart vscode, install the extensions, then save a file, and notice swiftformat wants to access your Apple Music etc
I've no idea why it would do that, unless somehow it's the default behavior for unsandboxed apps? (Although it's a command line app so I'm not even sure it's possible to sandbox it?)
I'm not going to be able to look into this right now - it might be worth contacting @vknabel and seeing if he has any insight into the VSCode extension permissions issue
I'm not sure why SwiftFormat now requires full disk access; it should be clarified.
Regarding the vscode extension, please open an issue there. PRs welcome as I am no longer into Swift nor vscode. A wild guess: the extension probably searches for any swiftformat config in the user directory and in the parent directories of the vscode workspace or the currently opened document. I remember I looked into this a few years back. Eventually I missed some edge case or did only fix it for the swiftlint extension.