I have a SwiftPM package that has a binary target pointing to a static XCFramework with a binary for macOS x86_64 and arm64 and one for iOS on arm64. If I set the destination to my iPhone, it builds successfully, but if the target is my Mac, it fails with a linker warning saying that it Could not find or use auto-linked library, and later terminating because some symbols are undefined. This only happens when building through Xcode; when I try using swift build, the build completes normally.
Post
Replies
Boosts
Views
Activity
I cannot figure out how to fix this error:
Static method 'buildExpression' requires that 'ToolbarItemGroup<TupleView<(Button<Label<Text, Image>>, EditButton)>>' conform to 'View'
This is my code:
var body: some View {
NavigationView {
List {
ForEach(items) { item in
NavigationLink {
Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))")
} label: {
Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))
}
}
.onDelete(perform: deleteItems)
}
.navigationBarTitleDisplayMode(.automatic)
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
Button(action: addItem) {
Label("Add Item", systemImage: "plus")
}
EditButton()
}
ToolbarItem(placement: .principal) {
Label("hi")
}
}
}
}
Im using the Xcode 15 beta 2 to build for iOS 17