Post

Replies

Boosts

Views

Activity

Reply to Is SwiftUI Picker not compatible with a Bindable property?
Sorry, forgot to include the view code: import SwiftUI import CommonUI import SwiftData struct ChoreView: View { @Bindable var chore: Chore @Environment(\.modelContext) private var context @Query private var familyMembers: [FamilyMember] var body: some View { Card { Form { Section("Name") { TextField("Name", text: $chore.name) } Section("Frequency") { Picker(selection: $chore.choreFrequency, label: EmptyView()) { ForEach(ChoreFrequency.allCases) { frequency in Text(frequency.rawValue.localized).tag(frequency.rawValue) } } } } .frame(maxHeight: 400) .padding(-6) } } }
Sep ’23
Reply to How to use dependencies in a Swift Package
Found my answer. In the target dependencies, need to include the package name as a string:         // Targets are the basic building blocks of a package. A target can define a module or a test suite.         // Targets can depend on other targets in this package, and on products in packages this package depends on.         .target(             name: "DBCore",             dependencies: [ "AgileDB" ]),         .testTarget(             name: "DBCoreTests",             dependencies: ["DBCore"]),     ]
Apr ’22