Post

Replies

Boosts

Views

Activity

Reply to SwiftData does not persist change on relationship on iOS 18 beta 7
I've created an example app that replicates the issue or my wrong doing. Follow this scenario for iOS17 and then iOS18 in the simulator. Add 3 notes Change review date for the second, and the third note. Switch immediately to Reviews view and remember results. Go back to Notes view Switch to Reviews view again after ~20-25 seconds In iOS17 the view is unchanged. In iOS18 the change is reverted. When you inspect the database with Core Data Lab you can see that the relationship property has been rolled back. Example code can be downloaded from here I do really hope someone else can spot what I am doing wrong.
Aug ’24
Reply to Navigation issue in Xcode 16 beta 7
iOS 18 beta 7, Xcode beta 6 (a slip-up) An update: This issue occurs only in Debug mode and seems to be related to environment macros in the view. I had the following line defined: @Environment(\.scenePhase) private var scenePhase However, the variable wasn't even used. After removing that line, the problem disappeared. I tried to create some code to reproduce the issue, but I couldn't get the issue to happen.
Aug ’24
Reply to iOS 18 SwiftData Bug: Codable Models Cause Relationship Mapping Error
It seems to be fixed in iOS 18.1 but this bug cost me a lot. After I exported data, deleted all data in the app and restored all data from the backup file, almost all tags had been lost before I noticed that something was not on. Red card for SwiftData team!
Replies
Boosts
Views
Activity
Oct ’24
Reply to iOS18 SwiftUI Bug: Theme Change Issue
Yes, at lease in iOS18.1 simulator the issue is completely gone. But this is a real shame that this happened and it hadn't been noticed before in any test suites.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftData does not persist change on relationship on iOS 18 beta 7
I have finally found the culprit. I'm using 2 model contexts at the same time to update the data. More information and demo app here.
Replies
Boosts
Views
Activity
Aug ’24
Reply to SwiftData does not persist change on relationship on iOS 18 beta 7
I've created an example app that replicates the issue or my wrong doing. Follow this scenario for iOS17 and then iOS18 in the simulator. Add 3 notes Change review date for the second, and the third note. Switch immediately to Reviews view and remember results. Go back to Notes view Switch to Reviews view again after ~20-25 seconds In iOS17 the view is unchanged. In iOS18 the change is reverted. When you inspect the database with Core Data Lab you can see that the relationship property has been rolled back. Example code can be downloaded from here I do really hope someone else can spot what I am doing wrong.
Replies
Boosts
Views
Activity
Aug ’24
Reply to Navigation issue in Xcode 16 beta 7
iOS 18 beta 7, Xcode beta 6 (a slip-up) An update: This issue occurs only in Debug mode and seems to be related to environment macros in the view. I had the following line defined: @Environment(\.scenePhase) private var scenePhase However, the variable wasn't even used. After removing that line, the problem disappeared. I tried to create some code to reproduce the issue, but I couldn't get the issue to happen.
Replies
Boosts
Views
Activity
Aug ’24
Reply to iOS 16 TextEditor long text jumping (SwiftUI)
The text doesn't have to be long. I've just noticed when you've got more than 40 lines the content gets into spasm.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to How to handle predicate with optionals in SwiftData
Thank you so much. It worked. This really puzzles me as the documentation https://developer.apple.com/documentation/foundation/predicate says that swift optionals can be freely used with predicates.
Replies
Boosts
Views
Activity
Dec ’23
Reply to How to handle predicate with optionals in SwiftData
Thanks for the answer. Unfortunately this doesn't work. It falls over with "to-many key not allowed here" error.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Remove XCode settings Document Types
Xcode 15.1 - This is really preposterous! I cannot remove any document type I've added nor exported/imported type identifiers.
Replies
Boosts
Views
Activity
Dec ’23
Reply to Xcode 15.0.1 object preview shows nothing in debug mode
I followed Paul Hudson about SwiftData iTour tutorial. Unfortunately my preview doesn't show anything.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23