swift 框架未生成
swift framework not generating
我在 Xcode 8 上使用 swift 创建了框架,但出现了以下错误。我正在使用 sqlite3,为此我在项目中创建了 module/module.map
文件并更新了 swift 编译器搜索路径。
错误
CompileSwift normal x86_64 /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBManager.swift
cd /Users/xxxxx/Documents/WorkSpace/TestFrame
/Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swift
-frontend -c -primary-file /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBManager.swift /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBConfigurations.swift /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/expected.swift
-target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
-I /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator
-I /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/module/module.map
-F /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator
-enable-testing -g -import-underlying-module -module-cache-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG
-serialize-debugging-options -Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/swift-overrides.hmap
-Xcc -iquote -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-generated-files.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-own-target-headers.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-all-non-framework-target-headers.hmap
-Xcc -ivfsoverlay -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/all-product-headers.yaml
-Xcc -iquote -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-project-headers.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator/include
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/DerivedSources/x86_64
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/DerivedSources
-Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/unextended-module-overlay.yaml
-Xcc -working-directory/Users/xxxxx/Documents/WorkSpace/TestFrame -emit-module-doc-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager~partial.swiftdoc
-Onone -module-name TestFrame -emit-module-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager~partial.swiftmodule
-serialize-diagnostics-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.dia
-emit-dependencies-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.d
-emit-reference-dependencies-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.swiftdeps
-o /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.o
<unknown>:0: error: opening import file for module 'Swift': Not a directory
On Xcode 8 个不需要的 module.map 文件,需要将 sqlite3.h 文件复制到项目目录中并将它们作为目标 membership.And 下的 public include sqlite3.h 伞中的文件 header 如下所示
#include "sqlite3.h"
我在 Xcode 8 上使用 swift 创建了框架,但出现了以下错误。我正在使用 sqlite3,为此我在项目中创建了 module/module.map
文件并更新了 swift 编译器搜索路径。
错误
CompileSwift normal x86_64 /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBManager.swift
cd /Users/xxxxx/Documents/WorkSpace/TestFrame
/Applications/Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swift
-frontend -c -primary-file /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBManager.swift /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/CatalogDBConfigurations.swift /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/expected.swift
-target x86_64-apple-ios10.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk
-I /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator
-I /Users/xxxxx/Documents/WorkSpace/TestFrame/TestFrame/module/module.map
-F /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator
-enable-testing -g -import-underlying-module -module-cache-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG
-serialize-debugging-options -Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/swift-overrides.hmap
-Xcc -iquote -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-generated-files.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-own-target-headers.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-all-non-framework-target-headers.hmap
-Xcc -ivfsoverlay -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/all-product-headers.yaml
-Xcc -iquote -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/TestFrame-project-headers.hmap
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Products/Debug-iphonesimulator/include
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/DerivedSources/x86_64
-Xcc -I/Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/DerivedSources
-Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/unextended-module-overlay.yaml
-Xcc -working-directory/Users/xxxxx/Documents/WorkSpace/TestFrame -emit-module-doc-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager~partial.swiftdoc
-Onone -module-name TestFrame -emit-module-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager~partial.swiftmodule
-serialize-diagnostics-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.dia
-emit-dependencies-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.d
-emit-reference-dependencies-path /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.swiftdeps
-o /Users/xxxxx/Library/Developer/Xcode/DerivedData/TestFrame-gdspwdcbodswscabqloeknuqsacg/Build/Intermediates/TestFrame.build/Debug-iphonesimulator/TestFrame.build/Objects-normal/x86_64/CatalogDBManager.o
<unknown>:0: error: opening import file for module 'Swift': Not a directory
On Xcode 8 个不需要的 module.map 文件,需要将 sqlite3.h 文件复制到项目目录中并将它们作为目标 membership.And 下的 public include sqlite3.h 伞中的文件 header 如下所示
#include "sqlite3.h"