Thanks. I'll take a look later.
Post
Replies
Boosts
Views
Activity
That's negative.
Thanks.
The pixelLength guy also returns 1.0 on my iMac. Disappointingly, many graphic things are not working under SwiftUI.
I get the same result under Xcode 14 and Xcode 15.
Okay. I've tested the code with my Retina 5K (5,120 x 2,880) iMac (6-Core Intel Core i5, 3 GHz, Built-In Retina LCD). It has returned 1.0.
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.
That is it. Thanks a lot.
Hmm... I haven't thought about using Codable. I'll try it tomorrow for the same task.
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.
I'll test your example as it is, then.
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'
Hmm... Unfortunately, the do-catch error for NSKeyedUnarchiver says "The data couldn’t be read because it isn’t in the correct format." 😢
Thank you, eskimo. That's very kind of you. I'll take a good.
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.