UIKit Autocomplete Broken in Xcode 15.0.1 Playgrounds

I recently updated to Xcode 15.0.1. Autocomplete for UIKit in Xcode Playgrounds seems to be non-functional. I'm able to write the code and compile it, but the autocomplete feature is entirely absent. Just to clarify, I'm referring to the regular Xcode Playgrounds, not the Swift Playgrounds App.

Here's a basic example:

import UIKit
let label = UILabel()

When I option-click on label, Xcode displays the type as <<error type>>. Additionally, after running the playground, the spinner at the top indicates "Ready to Continue", but it just doesn't stop spinning.

Has anyone else faced this issue? Has UIKit support in Playgrounds has been deprecated or is this just a bug?

I tried deleting and reinstalling Xcode and updating macOS to Sonoma.

Hello,

Try to delete the Derived Data folder.

Xcode > Settings > Locations > Derived Data > Click the arrow to open in Finder > Trash it. Or create a shell script and run it


# 1
echo "Removing Derived Data..."
rm -rf ~/Library/Developer/Xcode/DerivedData/

# 2
echo "Removing Device Support..."
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport
rm -rf ~/Library/Developer/Xcode/watchOS\ DeviceSupport
rm -rf ~/Library/Developer/Xcode/tvOS\ DeviceSupport

# 3
echo "Removing old simulators..."
xcrun simctl delete unavailable

# 4
echo "Removing caches..."
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Caches/org.carthage.CarthageKit

# 5
if command -v pod  &> /dev/null
then
    # 6
    pod cache clean --all
fi

echo "Done!"

Unfortunately this solution did not work.

I typed this into an empty playground and I got no compiler errors at all. The playground just sits and says "Ready to continue" endlessly.

import UIKit

blahblahblah1234
Hello
Goodbye

However if I put a space between any 2 characters, I get a compiler warning:

import UIKit

//Consecutive statements on a line must be separated by ';'
blah blah

This is the only compiler error I've been able to generate. I have restarted my system several times. Playgrounds for me seems to be completely broken.

UIKit Autocomplete Broken in Xcode 15.0.1 Playgrounds
 
 
Q