Swift Package Manager - UIKit Dependency

前端 未结 4 951
旧时难觅i
旧时难觅i 2020-12-15 04:05

I have a Package.swift in my project like:

import PackageDescription

let package = Package(
    name: \"ProjectName\",
        dependencies: [
           .P         


        
4条回答
  •  忘掉有多难
    2020-12-15 04:52

    The Swift Package Manager builds executables to run on OS X (or Linux); UIKit is a framework in iOS and won't be accessible.

    It may be iOS, tvOS and others become accessible as Swift Package Manager evolves.

    On Dec 4, 2015, at 5:39 PM, Daniel Dunbar (@apple.com) wrote:

    ...

    Right, now we only compile for the host platform (OS X or Linux, currently). Among other things, we currently have no knowledge (or options to choose) what SDK or architecture you are targeting. We also have no mechanisms for specifying what platforms targets are compatible with in the manifest.

提交回复
热议问题