You're very welcome. It's always nice to help others out and you always learn things along the way. Apple doesn't always know what we developers are thinking which is why feedback is so important. Hopefully, SwiftData gets better because if it's anything like SwiftUI's introduction then a lot of people will be happy. Good luck with your predicates!
Where do you know how many elements you have? You must have a variable or something that you can use to create the array with that many items and pass to the ForEach.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Using @Bindable could be better as you would have to create this new Binding for every property you need to access.
We are still in beta you must remember: things could change.
Make sure your SWDItem and SWDPackage classes are both marked with the @Model macro. Also, you are force unwrapping item.package and maybe that is causing something, I'm not too sure. You might have to show some more code here because there isn't enough to debug the situation.
If that solved your problem, can you please mark that post as being correct, therefore closing this thread and letting everyone else know the issue has been resolved.
If you mean comma, then no it doesn't. The commented part should be a boolean value of whether the URL should be opened in Safari. It's probably not clear enough in the sample code.
You're very welcome. It's always nice to help others out and you always learn things along the way. Apple doesn't always know what we developers are thinking which is why feedback is so important. Hopefully, SwiftData gets better because if it's anything like SwiftUI's introduction then a lot of people will be happy. Good luck with your predicates!
Where do you know how many elements you have? You must have a variable or something that you can use to create the array with that many items and pass to the ForEach.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
This solution was actually recommended by an Apple engineer during one of the WWDC activities. To add a binding to the @Environment property wrapper would mean adding a projectedValue. If that was something people would like to see (which it is) then they suggested filing a feedback report.
Using @Bindable could be better as you would have to create this new Binding for every property you need to access.
We are still in beta you must remember: things could change.
Make sure your SWDItem and SWDPackage classes are both marked with the @Model macro. Also, you are force unwrapping item.package and maybe that is causing something, I'm not too sure. You might have to show some more code here because there isn't enough to debug the situation.
If that solved your problem, can you please mark that post as being correct, therefore closing this thread and letting everyone else know the issue has been resolved.
If you mean comma, then no it doesn't. The commented part should be a boolean value of whether the URL should be opened in Safari. It's probably not clear enough in the sample code.