What I am trying to do is export a collection of Markdown files into an EPUB book. To create the EPUB book I start by creating a file wrapper that has everything the EPUB needs. I finish by using the ZIPFoundation framework to compress the file wrapper into a valid EPUB/Zip archive. When I finish building the file wrapper, I call the FileWrapper class's write function to temporarily create the file so ZIPFoundation can compress and archive it. do { // mainDirectory is the file wrapper root. wrapperURL is the location to export // from either the file exporter panel or NSSavePanel. try mainDirectory.write(to: wrapperURL, options: [], originalContentsURL: nil) } catch { Swift.print(Error temporarily writing the book's file wrapper to disk. Error: (error)) } When I step through this code in the debugger, it goes to the catch block and prints the following message in the console: Error: Error Domain=NSCocoaErrorDomain Code=513 You don’t have permission to save the file TestBook in the location (path to f
Topic:
Code Signing
SubTopic:
General
Tags: