Post

Replies

Boosts

Views

Activity

Comment on Does SwiftData support UIImage
Has the issue resolved? I convert a UIimage to data by the following codes, and save it to swiftData. But I get nil when I read it. Why? //save photo with swiftData let cameraPhotoID = UUID().uuidString let image = camera.photo.image! let data = image.pngData() let CameraPhoto = cameraPhoto(cameraPhotoID: cameraPhotoID,cameraPhotoData: data!) modelContext.insert(CameraPhoto) try? modelContext.save()
Nov ’23
Comment on Textfield bug after upgrading to IOS 17.0
Yes, it's SwiftUI app. After trying several times, I found the bug is related with @EnvironmentObject var. If I change $userViewModel.focusTime(which is an EnvironmentObject var) to focusTime(which is a @State var), the view works well. There is no any issue. But when I change the variable back to the @EnvironmentObject var, the same bug appears. But the data type is the same between both of them.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’23
Comment on How can we get crash reports for the app installed on users' devices
Really thank you for the information.
Replies
Boosts
Views
Activity
Mar ’25
Comment on How often iCloud will sync with local swiftData?
Hi, Ziqiao, Thank you for sharing the information. Best Wishes,
Replies
Boosts
Views
Activity
Mar ’25
Comment on Sandbox page is empty
Yes
Replies
Boosts
Views
Activity
Jan ’25
Comment on Does SwiftData support UIImage
Has the issue resolved? I convert a UIimage to data by the following codes, and save it to swiftData. But I get nil when I read it. Why? //save photo with swiftData let cameraPhotoID = UUID().uuidString let image = camera.photo.image! let data = image.pngData() let CameraPhoto = cameraPhoto(cameraPhotoID: cameraPhotoID,cameraPhotoData: data!) modelContext.insert(CameraPhoto) try? modelContext.save()
Replies
Boosts
Views
Activity
Nov ’23
Comment on Textfield bug after upgrading to IOS 17.0
Yes, it's SwiftUI app. After trying several times, I found the bug is related with @EnvironmentObject var. If I change $userViewModel.focusTime(which is an EnvironmentObject var) to focusTime(which is a @State var), the view works well. There is no any issue. But when I change the variable back to the @EnvironmentObject var, the same bug appears. But the data type is the same between both of them.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’23