Thanks. I don't remember exactly when I posted this topic. My Mac mini with a non-Retina display arrived exactly one month ago on September 28th, 2023. I strongly doubt that I ran the code on my Mac mini. And I'm quite certain that the code has returned 1.0.
Okay. I confirm that your example works such that I can save data to a file and then read data from that file. That should give me some idea. Thank you.
Also, if I set the requiringSecureCoding value to true, the do-catch error for NSKeyedArchiver says "The data couldn’t be written because it isn’t in the correct format'
You are not allowed to save a file to a path that you specify without user's consent if your desktop application is sandboxed unless it's directed at the sandbox folder your application is assigned to. I'm sorry to say, but that's macOS software development 101. I have seen a similar question several days ago at Stack Overflow.
Thanks. I don't remember exactly when I posted this topic. My Mac mini with a non-Retina display arrived exactly one month ago on September 28th, 2023. I strongly doubt that I ran the code on my Mac mini. And I'm quite certain that the code has returned 1.0.
Okay. I confirm that your example works such that I can save data to a file and then read data from that file. That should give me some idea. Thank you.
Also, if I set the requiringSecureCoding value to true, the do-catch error for NSKeyedArchiver says "The data couldn’t be written because it isn’t in the correct format'
You are not allowed to save a file to a path that you specify without user's consent if your desktop application is sandboxed unless it's directed at the sandbox folder your application is assigned to. I'm sorry to say, but that's macOS software development 101. I have seen a similar question several days ago at Stack Overflow.