2016-01-28 96 views
0

所有其他類似的問題並沒有解決我的問題。所以我決定問我自己的問題。我已經正確打開了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 

我的鏈接二進制與圖書館: enter image description here

這裏是我的橋接的頭文件,我不知道如何導入.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上起作用。

+0

您不必導入* .m文件 - 它們是補充* .h文件。它是否告訴錯誤在橋接頭?附:確保你在這裏檢查了所有的答案:http://stackoverflow.com/questions/29500227/xcode-no-such-module-error-but-the-framework-is-there –

+0

很多圖書館都給這個錯誤當你嘗試導入它們兩次時:一次在橋接頭文件中,另一次在實際代碼文件中。 –

+0

@Michael修復了這個問題。我可以從目標C類實例化對象,但我不能在頂部使用導入DownPicker。 –

回答