It seems that whenever I scan the contents of ~/Library/Containers
with my app, I get the warning [App] would like to access data from other apps
, regardless of how often I have already allowed it. When the warning appears, the last scanned file is ~/Library/Containers/com.apple.CloudPhotosConfiguration/Data
.
My sample code:
let openPanel = NSOpenPanel()
openPanel.canChooseDirectories = true
openPanel.runModal()
let url = openPanel.urls[0]
let enumerator = FileManager.default.enumerator(at: url, includingPropertiesForKeys: nil)
while let url = enumerator?.nextObject() as? URL {
print(url.path)
}
Is it expected that one has to allow this warning every time the app is run?