Swift Package Manager - Swift 4 syntax

前端 未结 1 2049
忘掉有多难
忘掉有多难 2021-02-13 18:16

I\'m trying to use updated SPM for Swift4 with the following Package.swift file - PackageDescription API Version 4

import PackageDescription

let pa         


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-13 18:58

    You're missing the tools version specifier in your manifest; add the following as the first line of your Package.swift:

    // swift-tools-version:4.0
    

    By default if that line is omitted, it'll default to manifest version 3 and also compiler version 3. For more information see SE-0152 or Swift Package Manager Manifest API Redesign on swift.org.

    0 讨论(0)
提交回复
热议问题