I am trying to create a new swift package i did the following commands on console
swift package init
swift package generate-xcodeproj
This works and generates an empty project. Inside the project sample file i added just one line
Import UIKit
In Xcode, this builds correctly.
But on console, when I do swift build
command,
I get this error
/Users/home/Desktop/TT/Sources/TT/TT.swift:1:8: error: no such module 'UIKit'
import UIKit
Is there any thing I am doing wrong?