Having issue with loading local content in a sandbox sample - AppSandBoxQuickStart; specifically once a file - via open panel or drag-n-drop does nothing, i.e., `AppDelegate.swift OpenURLInNewWindow(:URL,parent:NSWindow?)->Bool`;
if url.isFileURL {
if appDelegate.isSandboxed() != appDelegate.storeBookmark(url: url) {
Swift.print("Yoink, unable to sandbox file \(url)")
}
let baseURL = url.deletingLastPathComponent()
if isSandboxed() != storeBookmark(url: baseURL) {
Swift.print("Yoink, unable to sandbox \(baseURL)")
}
webView.loadFileURL(url, allowingReadAccessTo: baseURL)
}
else
{
webView.load(URLRequest.init(url: url))
}
Three quesitons here
- if the accessReadURL is supplied - base URL, is that not requried to be bookmarked as well? It seems to fail cites the enclosing directory is not found. It would seem required for local html files so loading a request is not a solution, nor does it work.
- either load function yields no content in the webView indicating a sandbox issue
- a file drag-n-drop onto the app's view should also require a bookmark, and its base, but when an alias, I had read that the actual url 'instance' provided should be used, so attempting to resolve the alias would be problematic
Of course if I turn off sandbox all smiles, but then this is a test case for an app submission.