Post

Replies

Boosts

Views

Activity

Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
In my case, I have an existing Core Data / CloudKit app that I am converting to SwiftData / CloudKit. The data structure is in the Cloud via CloudKit. The transition needs to be seamless from Core Data to SwiftData. My model has several image variables. Beta 5 saves the data fine. I can see it in the CloudKit dashboard. And my core data app can get the image data and display the images fine, even the data saved with Beta 5..
Jul ’23
Comment on Understanding the warning and how to fix it: Non-sendable cannot cross actor boundary
The more I look into this, the more I disagree with you. CKRecord is not sendable. The way to go, I think, is to create a struct with the fields from the CKRecords. Then pass the struct but make sure it's sendable. I have started to do this and it's clearing warnings. I have a CKMethods protocol. I think the way to go is to pass the stunt into the protocol's methods and get a struct from the protocol. Converting from CKRecord to Struct and from Struct to CKRecord.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
The issue for me is that I am converting a core data model into a SwiftData model. It needs to be compatible with the existing data format. The conversion worked great before Beta 5.
Replies
Boosts
Views
Activity
Aug ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
It is being defined as external storage (@Attribute(.externalStorage) var backImageData: Data?). See my original post. As I said, it worked fine until Beta 5.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
In my case, I have an existing Core Data / CloudKit app that I am converting to SwiftData / CloudKit. The data structure is in the Cloud via CloudKit. The transition needs to be seamless from Core Data to SwiftData. My model has several image variables. Beta 5 saves the data fine. I can see it in the CloudKit dashboard. And my core data app can get the image data and display the images fine, even the data saved with Beta 5..
Replies
Boosts
Views
Activity
Jul ’23
Comment on Sharing data with SwiftData
The initializer above has changed with Beta 5. Go here for the new initializers.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
Yikes! Please file a feedback.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
Please file a feedback.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
Please file a feedback.
Replies
Boosts
Views
Activity
Jul ’23
Comment on Xcode Automatically Managing Signing Yet Invalid Profile
Well done! That fixed my problem as well. I am marking this complete.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Core Data Plus CloudKit - Potential Issue / Question about Binary Data w/ External Storage
I'll just let CloudKit handle it. I don't want to mess with the CloudKit data directly.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Core Data Plus CloudKit - Potential Issue / Question about Binary Data w/ External Storage
My thoughts on this is that CKAssets can hold a larger amount of data than Bytes. I wonder if there will be issues holding image data. That's why I asked.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Please Create a Sendable Version of CKRecord or Make CKRecord Sendable
I'm marking your answer as correct and will file an enhancement request. I am also putting in the hours to do the conversion to Model files and it's working, but I am far from being done. I'll probably be done before anything is done on my request and that is understandable. Besides the data model structs are a clean fix.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Please Create a Sendable Version of CKRecord or Make CKRecord Sendable
Yes, I realize that I can @uncheck Sendable, but I wonder if that will last. Perhaps one will not be able to do this in the future. Yes, I realize that Data and String is Sendable.
Replies
Boosts
Views
Activity
Apr ’23
Comment on Understanding the warning and how to fix it: Non-sendable cannot cross actor boundary
The more I look into this, the more I disagree with you. CKRecord is not sendable. The way to go, I think, is to create a struct with the fields from the CKRecords. Then pass the struct but make sure it's sendable. I have started to do this and it's clearing warnings. I have a CKMethods protocol. I think the way to go is to pass the stunt into the protocol's methods and get a struct from the protocol. Converting from CKRecord to Struct and from Struct to CKRecord.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Understanding the warning and how to fix it: Non-sendable cannot cross actor boundary
Turned on that is.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on Mistake in Wayfinder Watch Face for Apple Watch Ultra?
It's in degrees, minutes, seconds and not in decimal. I'll definitely add that in the bug report.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’22