In Xcode itself I have a “cannot preview in this file” message, with a “Fatal Error in ModelContainer.Swift” message below. Despite this, I can preview it in the Simulator and everything works fine. Still, I am not content with it but I can’t seem to fix it myself. Can someone help me in the right direction?
Would you like to share your project and I’ll take a look?
Alternatively can you share your code that causing you issues by pasting your code in a reply.
If you want to share the project, here are some instructions on how to do that:
Compress the entire project into a zip file and share that via either Dropbox or Google Drive.
To compress the project, locate the project folder in Finder and then right click on the top level folder and select Compress ProjectName. The top level folder is the one that contains the file named ProjectName.xcodeproj and the folder named ProjectName.
Upload that zip file to either Dropbox or Google Drive and then create a share link then copy that link and paste that in a reply to this thread.
If you choose to use Google Drive then when you create the Share link, ensure that the “General Access” option is set to “Anyone with the Link” rather than “Restricted”.