Due to the new NavigationStack having quite a few problems, including a pretty significant memory leak at this time, I am still using the old NavigationView with a build target of iOS 15+.
However, devices running iOS 16 are no longer showing the ToolbarItemGroup contents in the keyboard. ToolbarItem(placement: .navigationBarTrailing) works perfectly, but ToolbarItemGroup(placement: .keyboard) no longer shows the contents.
Here's the code I am using for the keyboard toolbar items:
.toolbar {
ToolbarItemGroup(placement: .keyboard) {
HStack {
Spacer()
Button {
isFocused = nil
} label: {
Image(systemName: "keyboard.chevron.compact.down")
}
}
}
}
This should show the image at the top of the keyboard, allowing the user to unfocus on tap. It works perfectly on iOS 15 but nothing shows on a device running iOS 16.
I am testing on a real device, not the simulator.