Swift自动生成的框架模块图

时间:2017-08-17 05:45:16

标签: swift xcode module frameworks

我有一个自定义框架,它使用manuel创建的module.modulemap中的一些模块: -

module SQLite [system] {
    header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h"
    export *
}

module zlib [system] {
    header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/zlib.h"
    export *
}

当我构建我的框架时,新的module.modulemap文件会自动生成如下: -

  framework module MyFramework{
  umbrella header "MyFramework.h"

  export *
  module * { export * }
}

module MyFramework.Swift {
    header "MyFramework-Swift.h"
}

当我将我的框架导入新项目时,我错过了所需的模块" sqlite"," zlib"错误。 我尝试用这样的texteditor编辑自动生成的模块映射文件;

framework module MyFramework{
  umbrella header "MyFramework.h"

  export *
  module * { export * }
}

module MyFramework.Swift {
    header "MyFramework-Swift.h"
}

module SQLite [system] {
    header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h"
    export *
}

module zlib [system] {
    header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/zlib.h"
    export *
}

它有效。

如何自动将模块导入自动生成的模块图?或者我如何修复"缺少必需的模块" sqlite"," zlib""错误? 谢谢你的帮助。

0 个答案:

没有答案