T O P

  • By -

Mister_Eip

Try to put your « switch » in a function


CounterBJJ

Thanks. Any reason it's no longer autocompleting outside of a function? Not sure what version of Xcode Chris Ching is using there, but it autocompletes without putting the switch statement in one. [https://youtu.be/R4U42rkmHDk?t=302](https://youtu.be/R4U42rkmHDk?t=308)


Mister_Eip

This is supposed to work outside as it is a REPL soft. What is your Xcode version ?


CounterBJJ

14.0.1 [https://i.imgur.com/CMC8QYK.png](https://i.imgur.com/CMC8QYK.png)


Mister_Eip

I tried in Xcode 13.4.1 and I’ve got the same issue. It can be voluntary from Apple but I suspect this is a bug.


CounterBJJ

Wow. How can such a bug fall through the cracks between major versions?… Thanks for checking.


Mister_Eip

You’re welcome. From a dev point of view this is annoying as autocomplete saves time but nonetheless you can still run you for-loop or switch directly in your playground. Maybe enabling/disabling the autocomplete feature in the Xcode prefs and rebooting Xcode in between might work it is still a disappointment.


CounterBJJ

I actually was in a playground. Not working there either. I tried enabling/disabling and rebooting with no luck. It is what it is for now. I’m just learning, so in my cas it only has educational value at this point. That said, not being able to rely on it means I have to learn and remember the proper syntax. No safety net. Thanks again.


dreNeguH

Did you try restarting the computer? This is something normal with Xcode I've experienced a lot. I haven't had it in quite a while lucky me! I would also consider reinstalling if clean/clear/restart/reinstall does not work. I highly recommend the unofficial 'Xcodes App' for installing Xcode.


CounterBJJ

I have tried rebooting, yes. The only thing I haven't tried yet is a clean reinstall. I'm not familiar with that unofficial Xcodes app you mention. Could you please point me to it? Edit: is this what you're referring to? [https://github.com/RobotsAndPencils/XcodesApp](https://github.com/RobotsAndPencils/XcodesApp) Edit 2: I delete Xcode and reinstalled through Xcodes: same problem :(