iOS Revisited: SwiftUI

Hot

Post Top Ad

Showing posts with label SwiftUI. Show all posts
Showing posts with label SwiftUI. Show all posts

9 Jun 2019

Cannot preview in this file - active schema cannot build this file Xcode 11 beta.

6/09/2019 12:37:00 am 0
This is happening most of times, no need to worry we can fix with one of the following solutions.


Solution 1:

Go to Xcode preferences -> Locations -> Command line tools

Here, most of them are set to Xcode 10, change to Xcode 11.

Restart Xcode 11 beta, the try it should be ok.

Solution 2:

1. Delete the ContentView.swift file.

2. Create new 'SwiftUI View'

3. Name it same as ContentView.swift.

4. Now click resume in the canvas, we can see preview loading.

Sometimes restarting system may also help.
Read More

Post Top Ad