Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Ignoring import

I have just installed Xcode 11 and when I try to create new fresh project with the SwiftUI check mark selected it returns an error.

Not able to build and run successfully.

File 'ContentView.swift' is part of module 'SwiftUI'; ignoring import

ContentView.swift

enter image description here

Use of undeclared type 'View'

SceneDelegate.swift

enter image description here

Use of unresolved identifier 'UIHostingController'

I have tried removing all derived data and also set command-line tools to 11

like image 418
PinkeshGjr Avatar asked Jun 08 '19 11:06

PinkeshGjr


1 Answers

Your project is named SwiftUI - please try using a different name.

like image 131
Matteo Pacini Avatar answered Oct 11 '22 02:10

Matteo Pacini