Newbie here. Using Xcode 13.2.1. I'm on a Linkedin Learning course on appmaking. Going smoothly till I'm asked to preview the work. Keeps crashing. Visited a bunch of sites for advice but I'm probably not seasoned enough to understand a bunch of it. Let me know what information you need. Thanks!
Xcode preview crashing
till I'm asked to preview the work. Keeps crashing.
Please explain precisely what you do to preview the work.
And also:
- Show the complete code of your app (SwiftUI I guess ?).
- Show the crash report.
- Show a screen capture showing the preview panel and probably the crash indicated.
Thanks...per the tutorial I simply activated the preview function on the right side of the xcode editor (forgive my incorrect use of labels). Screenshot link below (includes the code and the "Preview Crashed" appearance in the preview)
also link to the two error messages I get, besides "First App crashed"
thanks for your help!
From the log, you have a problem to connect to your account. Have you a free developer license ?
Do you know this account : a.j.selby @ gmail.com
Is toddperkins your company ?
If not, check what you have in Signing and Capabilities for the project:
- select project name at the top in the left panel (file navigator)
- select targets
- select Signing and Capabilities tab.
If that doesn't work, you may have a look here (about license):
thanks...toddperkins is the person who wrote the tutorial on linkedin learning that I am following.
I have signed the xcode preview agreement via the command line.
I entered my appleid and the screen changed to the attached...still no go...
I am thinking I may just need to copy and paste all the code from the content and main views from the original todd perkins exercise file, but not copy anything that says "Todd Perkins."
But what else can I do about the screen I see? Thanks!
Have you a developer account ? If so, you need to enter your own team (the one you have declared) here.
Otherwise, try to create a new project, create all the needed files and nib, storyboard, and copy the content of the original project, file by file. You will have to recreate the nib and storyboards manually.
Hi Claude, I have done all of the above but still no progress.
Attached is a screenshot of what I get when I try to preview my slider app with all the files recreated by me.
recreated everything from scratch, no help.
created a brand new app file, no preview.
LMK what I should do...thanks.
Here's what I see when I preview:
this is really late but I got here because my previews are crashing (for some other reason)
The reason this one is crashing is because the second call to padding is missing the period before it. So padding() is simply a call to the padding() function on ContentView, which causes infinite recursion. The .padding() modifier should be applied to the second HStack.