Is there any reasonable way to track file edits and closures in Swift on a Mac?
What I need:
- (Completed) Open a file from the server (With default application - for example: MS Word for docx)
- Track changes to the file, mainly OnChange, OnClose, and based on those, send commands and the file back to the server
What i tried:
- I read forums.swift article and coresponding with this article also developer.apple.com and stackoverflow.com post. Everybody talks about the fact that it basically can't be done. At least not properly.
- I tried to get some scripts from the AI, but that was also completely useless.
I currently want to try catching OnChange by displaying the resized file, and OnClose by using a file that creates a word and deletes it when closed. It's not an ideal solution, it's not even tested yet, but if we're primarily concerned with Word, Excel and PowerPoint, I don't currently have a better solution.