Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何为cocoapods项目设置modulemap?_Ios_Objective C_Swift_Xcode_Cocoapods - Fatal编程技术网

Ios 如何为cocoapods项目设置modulemap?

Ios 如何为cocoapods项目设置modulemap?,ios,objective-c,swift,xcode,cocoapods,Ios,Objective C,Swift,Xcode,Cocoapods,我试图使用一个用Obj-C编写的pod,我的项目只是Swift。 在framework.h文件中的依赖项的import语句中,我在framework module中包含了一个非模块头,这是一个错误 该设备的吊舱规格为: 然而,我不知道如何正确地做到这一点。 我应该在library/Classes文件夹中创建一个名为ModuleMap.h的文件吗?然后把下面这样的东西放进去 框架模块MixModuleFramework{ 伞头“MixModuleFramework.h” 出口* 模块*{expor

我试图使用一个用Obj-C编写的pod,我的项目只是Swift。 在framework.h文件中的依赖项的import语句中,我在framework module中包含了一个非模块头,这是一个错误

该设备的吊舱规格为:

然而,我不知道如何正确地做到这一点。 我应该在library/Classes文件夹中创建一个名为ModuleMap.h的文件吗?然后把下面这样的东西放进去

框架模块MixModuleFramework{ 伞头“MixModuleFramework.h” 出口* 模块*{export*} }

我不想在项目中使用允许非模块化包含在框架模块中。我想让这个库与其他项目一起工作

当我尝试运行
pod lib lint时--没有干净的

error: include of non-modular header inside framework module 'flutter_vlc_player.FlutterVlcPlayerPlugin': 'MobileVLCKit/MobileVLCKit.framework/Headers/MobileVLCKit.h' [-Werror,-Wnon-modular-include-in-framework-module]
从Xcode错误:

Include of non-modular header inside framework module 'flutter_vlc_player.FlutterVlcPlayerPlugin': '/var/folders/k7/1ptshnq15zn3nz6bgp7sj8h88w6vb6/T/CocoaPods-Lint-20200423-87288-nosd33-flutter_vlc_player/Pods/MobileVLCKit/MobileVLCKit.framework/Headers/MobileVLCKit.h'
cocoapods似乎自动生成了一些模块映射

framework module flutter_vlc_player {
  umbrella header "flutter_vlc_player-umbrella.h"

  export *
  module * { export * }
}


尽管如此,我对modulemap的这个问题非常感兴趣,它不允许使用swift构建应用程序的项目。那么,我如何制作定制模块应用程序并让podspec知道这一点呢?或者,是否必须进行任何其他配置?

模块图仅适用于Swift上编写的模块,而对于Objective-C则不需要。这是否回答了您的问题?我希望该库能够通过仅Swift应用程序导入。这个问题对我帮助不大。
pod lib lint
给出了没有模块映射的错误,如果您尝试创建一个新项目(仅限swift)并尝试导入库,您也会得到错误。
Include of non-modular header inside framework module 'flutter_vlc_player.FlutterVlcPlayerPlugin': '/var/folders/k7/1ptshnq15zn3nz6bgp7sj8h88w6vb6/T/CocoaPods-Lint-20200423-87288-nosd33-flutter_vlc_player/Pods/MobileVLCKit/MobileVLCKit.framework/Headers/MobileVLCKit.h'
framework module flutter_vlc_player {
  umbrella header "flutter_vlc_player-umbrella.h"

  export *
  module * { export * }
}