Is XCode 11.1 buggy?

Hello,

I've just upgraded to Catalina (MacOS 10.15) and XCode 11.1, and am going through the SwiftUI "Landmark" tutorials. I see a lot of troublesome behavior.

- Frequent "Build system" crashes

- Frequent compile errors in the Preview canvas, even when the project itself compiles perfectly and the PreviewProvider code is fine.

- Unrecognized types, e.g. "UserData" in the Handling Input section. I create the UserData.swift file and it's fine. However, references to the new struct remain unresoived, despite numerous Clean operations and Build operations. Quitting XCode completely and restarting it seems to resolve the problem.


Is anyone else having these issues? I'm surprised that these are Apple Tutorials that are causing all the problems.


Thansk in advance for any advice or other input.


Best,

Michael

Replies

Landmark tutorial has clearly a lot of issues (notably it seems it was not updated to cope with SwiftUI evolutions).


If you look in this forum, you will find a lot of threads about similar issues.


My advice: forget this tutorial unless it is updated to the last SwiftUI.


PS: this thread should be moved to SwiftUI.

> I'm surprised that these are Apple Tutorials that are causing all the problems.


Don't be. Many are put together simply to demo specific tech, and routinely lack optimization, etc. It's on the dev to stay light on their feet when working with Apple supplied samples and tutorials.

Thanks for the prompt and helpful responses. I'll find other tutorials.


That said, it seems like there are some issues with XCode itself, too. IMO, if user code can crash the compiler/IDE, then that's on the compiler/IDE.

Michael:


> Quitting XCode completely and restarting it seems to resolve the problem.


About that - can you talk about your hardware? Physical ram, harddrive type, drive free space...?


>I'll find other tutorials.


Be very careful, especially w/something new along the lines of SwiftUI. Random tutorials off the 'net and/or from books, etc, are frequently out of date. If you need help w/3rd party examples, it's on their authors for support.


Again, the dev needs to be eyes-wide-open with such resources.


And FWIW, 11.1 for me hasn't crashed out yet. So far, it's been more well behaved than other full-point versions.


Ken

Quitting XCode completely and restarting it seems to resolve the problem.


That is sometimes the case when you install a new XCode release.


Need to restart (even the computer) to make sure evrything is fully set up.

What a legend. Spend a few hours using the tutorial and couldn't figure out why nothing worked. It is my first time using this developer website and frankly disappointed with the bugs and lazy code. Does not encourage any newbies into Swift coding.

I can just agree. It is really a pity that tutorials are not robust at all, specially as their goal is to bring new users to adopt the technology (here SwiftUI). Not a good promotion in fact.


Only thing you can do: file a bug.

Worth noting: Xcode 11.2 fixes several issues I had encountered. However, WKMapView seems to just crash in the simulator (including the canvas), and that bug is still there. Type checking bugs from 11.1 are all fixed though, so you shouldn't get random build timeouts any more.

The SwiftUI project is awfully buggy. The documentation is close to non-existent. But I'm not sure that anyone developing for Apple products can afford to ignore it.


My experience is that many mystery issues go away if you use the Product -> Clean Build Folder option and then rebuild.


If that doesn't work, then Quit Xcode and restart.


If that doesn't work, then go over the code looking for possible errors in your typing. For example, I'm working on the fifth tutorial, Animating Views and Transitions, and there is instruction in the code to add the line, ".animation( .easeInOut() )". The problem is that the the ".easeInOut" enum does not take closing parenthesis. The problem goes away when the parens are removed.


Unfortunately, I don't see any way to report errors in the tutorials.


Marty

> I don't see any way to report errors


Feel free to file bugs against the docs, tools etc. via the bug reporter/(suggestions) link below, being sure to add your report #s to your comment for reference, thanks & good luck.

My Xcode 11.1 and 11.2b2 are crashing when I click on my project name. I did some work on the project in 11.2b2 and returned to 11.1 to create a release build. I don't think the beta and the production releases play nice together. Crash reports have been sent to Apple.

All that issues and more happend to me the moment i downloaded xcode command tools and the worst part is that i have XCode 11.1 and no release for xcode commands tools but only 11.0 and 11.2 beta i wont go for the beta ofcourse anyway i tried to remove the Xcode command tools and it helped me temporarely but then after a short time i have many bugs again, worst thing that it stops the auto complete that was a huge help while writing the codes as it does not recognize most of the codes,

note to say that among all those bugs the xcode still make a working builds although the project full of red alerts, it's kinda crazy to find fatel errors and you still can build your project successfully.


I hope apple would concentrate this time when issuing the next XCode 11.2.

Not more or less buggy than older versions of xcode. In some senses (especially the doc reader) it has even gotten more stable.

That said, IMO Xcode 11 is the slowest version of xcode ever. But then again, it does more so it needs more CPU power.


iMac Pro is the least you need to make it run fast. My 2016 Late MBP was fine with Xcode 9 & 10 but the whole system bogs down with 11.


In General, I do like the route Apple is taking with Xcode.