Xcode 9.1 - playgrounds broken
Asked Answered
L

0

8

I am having absurd problems since updating to Xcode 9.1.

Opening playgrounds from the 'App Development with Swift' curriculum yields completely broken results, as you can see in the following image.

as you can see there is no functioning button.

Also, when I create a new empty playground (iOS, empty), I get greeted by the usual "Import UIKit" line but then the compiler tells me "UIKit no such module exists".

UIKit no such module exists

Could anyone shed some light on all of this? I run Xcode 9.1 on a 2016 15" MacBook Pro, with macOS 10.12.6.

Thanks

UPDATE: downloaded Xcode v 9.0 and v 8.3.2. 9.0 doesn't have the issue with the playgrounds and 8.3.2 doesn't have the issue with the TouchBar.

Lorica answered 5/11, 2017 at 12:39 Comment(13)
What do you need the UIKit for in a playground? Just put import Foundation instead.Afroasian
I didn't do it myself. The playground created itself with it inside. I suppose that is an error? But why change it? Do you know also why the first mistake would happen? The one that makes disappear the navigation?Lorica
I did indeed cancel it out and inserted 'import Foundation'Lorica
By the way, how did you create the greyed out background for UIKit and import Foundation? I tried to look for instructions into the formatting section but didn't find anything ...Lorica
What do you mean by greyed-out background?Afroasian
If you look at your first comment, the UIKit and import Foundation have a grey background. It seems something due to the markdown formatting but have no idea how to do so. But please, could you (or anyone else) help me with this Xcode 9.1? It is so broken ...Lorica
Ohh I see. Just put backticks: `. You can also click help below comment to see formatting tips :)Afroasian
like this? :) very tricky with Italian keyboard :)Lorica
Can confirm this. No workaround yet.Zingaro
I cannot reproduce this. Mine's just fine ; There's some problem in you toolsStarinsky
Confirm same problem, except Xcode doesn't inform me of what's broken either. None of the suggested imports fix the problem. Reccomend different version of Xcode or online playground.Monas
@Monas how can you make playgrounds online? Very interested in that! At the moment I have 9.2, 9.0 & 8.3.2 installed at the same time. Depending on what I need I use different versionsLorica
Beware of link-rot: iswift.org/playground... My current best workaround is new project -> command line tool and tinkering with the main.swift, breakpointing with the variables view if i need to stop it halfway.Monas

© 2022 - 2024 — McMap. All rights reserved.