@vox Humana This does not work. The error I posted above is from the "Diagnostics" button, which remains after your proposed fix. Have you gotten previews to work in a swift package yourself?
Post
Replies
Boosts
Views
Activity
The solution:
Create a new swift package
Delete the auto generated struct that will be the name of your swift package
Remove the unit test associated with the auto generated struct
Edit the package.swift file to include the platform (example below: iOS)
Ensure you have the schema selected and the correct device selected for the preview you want. (Ex: iPhone selected for iOS)
platforms: [
.iOS(.v13)
],
Does anyone know how to move a database assuming you have a production core data app with the default URL? and you want to start using a widget?
Any progress on this? Still occurring for me. Hopefully a fix at WWDC 21
Edit: As stated above by @hongduongdang a fix is adding the following:
add .navigationViewStyle(StackNavigationViewStyle()) to the NavigationView seems to fix it for me.
It is worth noting this is still a bug and may not be the solution everyone wants as it could interfere with iPad style navigation within navigationView.