所有其他类似的问题并没有解决我的问题。所以我决定问我自己的问题。我已经正确打开了xcworkspace文件。这里是我的podfile:没有这样的模块'DownPicker'Cocoapods
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'WashAndShine' do
pod ‘DownPicker’,git : https://github.com/Darkseal/DownPicker
end
target 'WashAndShineTests' do
end
target 'WashAndShineUITests' do
end
这里是我的桥接的头文件,我不知道如何导入.M file.Is这个问题?
#ifndef Header_h
#define Header_h
#import "DownPicker.h"
//#import "DownPicker.m"
#import "UIDownPicker.h"
//#import "UIDownPicker.m"
#endif /* Header_h */
但是即使建成后它仍然没有说这样的模块吗?我做错了什么?尝试重新安装它,但仍然是同样的事情。在我看来,唯一可能导致它失败的是Downpicker是用Objective C编写的,但是从这篇文章Combobox component for Swift (failed with DownPicker)看起来它在Swift上起作用。
您不必导入* .m文件 - 它们是补充* .h文件。它是否告诉错误在桥接头?附:确保你在这里检查了所有的答案:http://stackoverflow.com/questions/29500227/xcode-no-such-module-error-but-the-framework-is-there –
很多图书馆都给这个错误当你尝试导入它们两次时:一次在桥接头文件中,另一次在实际代码文件中。 –
@Michael修复了这个问题。我可以从目标C类实例化对象,但我不能在顶部使用导入DownPicker。 –