Post

Replies

Boosts

Views

Activity

Reply to iPad attempting to import Journaling Suggestions
This won't let me upload the zip file.. import SwiftUI #if canImport(JournalingSuggestions) import JournalingSuggestions #endif struct ContentView: View { var willNotCrash: AnyView { #if canImport(JournalingSuggestions) if true == false { //should never run, but still crashes return AnyView(JournalingSuggestionsPicker("Picker") { suggestion in }) } else { return AnyView(Text("Should always show")) } #else return AnyView(Text("Should show on ipad")) #endif } @ViewBuilder var willCrash: some View { #if canImport(JournalingSuggestions) if true == false { JournalingSuggestionsPicker("Picker") { suggestion in } } else { Text("Should always show") } #else Text("Should show on ipad") #endif } var body: some View { VStack { // willCrash willNotCrash } .padding() } }
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’24