I have and in the same boat can’t seem to find a solution around it, also I don’t understand why it’s macOS only, this api should work on iOS and macOS because they didn’t state in WWDC that this api is macOS only
Post
Replies
Boosts
Views
Activity
Yeah I also can confirm my SwiftUI Cross-platform Application is running much slower than in the iOS Simulator, seems like a Memory leak since the app is running on iOS using only 20mb of ram but on mac it keeps climbing to like 1 GB of ram, using ScrollView with a LazyVStack that Provides sections in grid format using the new LazyVGrid
Thanks @mtsrodrigues I also was trying to find out how to use CoreData with a Pure Cross-platform SwiftUI App
Yeah Im getting the Same error from a @Binding var, code did work in 11.3 but doesnt in 11.4 beta,here is my code that doesnt work for example case:struct CodeEditorView: View {
// Variables
@Binding var text: String // What is possibly causing the error
var isActive: Bool? = true
var hideStatusBar: Bool? = false
// Error wants me to initialize text (aka the binding)
//but its impossibly to initialize a Binding based on how theywork
/*init(text: String = "", isActive: Bool? = true, hideStatusBar: Bool? = false) {
self.text = text
self.isActive = isActive
self.hideStatusBar = hideStatusBar
}*/
var body: some View {
VStack {
HStack {
CodeTextView(text: $text, isEnabled: self.isActive)
}.padding(.bottom, !hideStatusBar! ? -7 : 0)
if (!hideStatusBar!) {
CodeEditorStatusBarView()
}
}.padding(.top, -20)
}
}