0

All the other similar questions did not solve my problem.So I decided to ask my own . I have opened the xcworkspace file correctly . Here is my podfile:

# 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

My Link Binary with Libraries : enter image description here

Here is my bridging header file , I don't know how to import the .m file.Is that the problem?

#ifndef Header_h
#define Header_h

#import "DownPicker.h"
//#import "DownPicker.m"
#import "UIDownPicker.h"
//#import "UIDownPicker.m"
#endif /* Header_h */

But it still says no such module even after building ? Have I done anything wrong? Tried reinstalling it but still same thing . The only thing that might cause it to fail in my opinion is Downpicker is written in objective C. but from this post Combobox component for Swift (failed with DownPicker) it looks like it does work on Swift.

Community
  • 1
  • 1
Syed Ariff
  • 722
  • 2
  • 8
  • 26
  • You don't have to import *.m files - they are supplementary to *.h files. Does it tell the error is in the bridging header? P.S. make sure you checked out all the answers here: http://stackoverflow.com/questions/29500227/xcode-no-such-module-error-but-the-framework-is-there – Mike K Jan 28 '16 at 14:53
  • A lot of libraries are giving this error when you try to import them twice: once in your bridging header and another time in the file with actual code. – Mike K Jan 28 '16 at 14:58
  • @Michael Fixed the problem . I can instantiate objects from objective C classes but I cannot use import DownPicker at the top. – Syed Ariff Jan 28 '16 at 15:09

1 Answers1

0

You should import it in your swift bridging header file.

https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html

and define your header file here to xcode

turushan
  • 690
  • 7
  • 25