Closed IAmVigneswaran closed 1 month ago
@milanvarady I have attempted to fix the '@StateObject' used inline will not work unless tagged with '@Previewable'
the warnings using ChatGPT.
I have created a separate branch. https://github.com/TheAcharya/MarkerData/tree/Fix-Warning
Based on this initial build, there were no warnings.
I have also created test-build. On using the application, there were no apparent issues on first glance.
However, could you please check is the code / approach is correct or if it might pose or conflict with our remain codebase.
https://github.com/TheAcharya/MarkerData/compare/main...Fix-Warning
Thank you.
I have fixed the previews and updated some other ones as well.
Related to #106 & https://github.com/TheAcharya/MarkerData/issues/106#issuecomment-2380016195
Based on this apple developer forum post, this is a known issue in Xcode 16.
I believe this
'@StateObject' used inline will not work unless tagged with '@Previewable'
it would be fixed in future versions of Xcode.Related - https://www.avanderlee.com/swiftui/previewable-macro-usage-in-previews/ https://stackoverflow.com/questions/60105438/swiftui-preview-provider-with-binding-variables/66175501#66175501 https://www.hackingwithswift.com/forums/swift/new-atpreviewable-and-previewer-issues-for-swiftdata/27357 https://www.reddit.com/r/SwiftUI/comments/18xdv0h/why_dont_we_need_stateobject_since_xcode_15/?rdt=55626
Hopefully we can address this in future versions of Marker Data.