Post

Replies

Boosts

Views

Activity

Reply to SwiftUI and Large Data
If your data is local, then using CoreData might be an option. Then you'd have only one model. If your data resides on a remote server/database, then you'd have a local (Swift)UI model, plus the remote data model. In that case you'd need to write the code to manage loading the proper data from remote into your local UI model. Here you have to be careful, that the remote data is the "source of truth", not the data in your local UI model. One way to handle this would be to only update the remote data model and then load/update the UI model (and never modify the UI model other than from the remote model).
Dec ’20
Reply to Is this usage a @State variable wrong?
@Claude31 it works with or without the private keyword. My initial question was regarding the correctness of the documentation. I am accessing a @State property outside of a view's body, whereas the documentation states: only access a state property from inside the view’s body Cheers, Michael
Nov ’20
Reply to Is this usage a @State variable wrong?
@Claude31 The coding works just fine. My question was, if either the coding is not correct (while working fine) or the documentation is probably not correct (or at least unclear). As for your question regarding my usage of private. Here's the whole paragraph from the documentation - https://developer.apple.com/documentation/swiftui/state (emphasis added). You should only access a state property from inside the view’s body, or from methods called by it. For this reason, declare your state properties as private, to prevent clients of your view from accessing them. It is safe to mutate state properties from any thread. Cheers.
Nov ’20
Reply to Xcode 12 & iOS 14 betas - SwiftUI Lists do not render content when presented in a Sheet/Modal view.
This seems to be related to issues myself and several others are facing. I asked (here: https://developer.apple.com/forums/thread/662553), if anybody has received any official update on that issue, yet. So far it seems nobody did. Frankly I find it worrying, that something quite fundamentally breaks in a new, but not beta framework and it's three month without a fix or at least getting any info (workaround, or even a "hey, we know it's a bug") from Apple. Any communication on this would not only help to get applications working which were finde in iOS13, but also help to decide, if other issues we are seeing (like animations not working anymore in some cases) are related or something new. So far I haven't received any feedback on the feedback I filed (FB8714689). At least I now see that there are "more than 10" similar reports - it seems we're building a community here ;-). And, to end on on a positive note: So far feedback for SwiftUI I gave, was definitely handled way better/faster, than any other feedback I gave.
Oct ’20
Reply to volumeUUIDString missing
Bookmarks! That was the hint I needed :-)So far testing looks good: Both the good and the problematic SD cards were identified correctly.Thanks for the help, Quinn! I'll make sure to have the proper coding in place, for cases when the approach with the bookmarks fails horribly.Cheers, Michael
Jun ’20
Reply to volumeUUIDString missing
If coling the volume means, that the content is cloned as well, then that could be fine for my use case (well actually there might be edge cases where it would not). So let me explain why I want to do it:Essentially what I am trying to do (on an abstract level), is to write an application which catalogues files, which may or may not be stored on external drives. Some metadata of those files would be stored locally in an import step and also available if the external drive is not connected. If the user needs to access the original file, the application should be able to detect if the proper drive and thus the file (if not deleted, etc.) is available or not.On a not so abstract level: Think of cataloging photos from SD cards from the same camera. Using the SD cards basically as film rolls, meaning never overwriting them. If the original photo needs to be retrieved, the SD card may be plugged in, is automatically detected and the file can be retrieved.Not sure if my explanation is good enough, though. ;-)Thanks, Michael
Jun ’20