2016-09-28 5 views
0

私はSwift Package Managerに自分のライブラリを統合しようとしています。 swift buildを実行した後にそれが成功した依存関係をダウンロードしますが、それはまた、私に次のエラー与える:宣言されていない型adter 'swift build'

/Users/nikita/Documents/Projects/Projects/TestFramezilla/test/Packages/Framezilla-0.1.1/Sources/UIView+Installer.swift:14:18: error: use of undeclared type 'UIView' 
public extension UIView { 
       ^~~~~~ 
/Users/nikita/Documents/Projects/Projects/TestFramezilla/test/Packages/Framezilla-0.1.1/Sources/UIView+Installer.swift:29:18: error: use of undeclared type 'UIView' 
public extension UIView { 
       ^~~~~~ 
/Users/nikita/Documents/Projects/Projects/TestFramezilla/test/Packages/Framezilla-0.1.1/Sources/UIView+Relations.swift:27:11: error: use of undeclared type 'UIView' 
extension UIView { 
      ^~~~~~ 
/Users/nikita/Documents/Projects/Projects/TestFramezilla/test/Packages/Framezilla-0.1.1/Sources/UIView+Relations.swift:39:18: error: use of undeclared type 'UIView' 
public extension UIView { 

Cocoapodsとカルタゴの作業罰金を。私は本当に多くの時間を費やし、私が間違っていることを理解できません。誰かが私を助けることを願っています!

答えて

1

iOSフレームワークを構築しようとしているようです。パッケージマネージャー自体は現在、実行中のプラットフォーム以外のプラットフォーム(この場合はmacOS)を直接ターゲットにすることはサポートしていません。

iOS向けにビルドする場合は、Xcodeプロジェクトを生成し、そこからビルドする(swift package generate-xcodeproj)必要があります。生成されたプロジェクトを手動で変更して、iOS SDKを使用するように変更する必要があります。

関連する問題