I have a macOS app and I can access the file comment and get it to display, but how do I edit it and have this edit get added to the comment so when I revisit the file, the comment is updated to what I updated it to in my app? Is there an easy way to do this?
My code is here:
let mditem = MDItemCreateWithURL(nil, url! as CFURL)
var comment = MDItemCopyAttribute(mditem, kMDItemFinderComment)
updateComment = commentBox.stringValue as CFTypeRef
updateComment is the thing that isn't working for me at this stage.