Im working on an iOS project, which shows the customer number in a barcode. I had installed the framework ZXingObjC
with CocoaPods, described in GitHub.
I can compile my Project without errors. I can also use the classes of ZXingObjC
in my Objective-C classes, without errors. After than, I have added the import Command #import <ZXingObjC/ZXingObjC.h>
to my bridging header file, like my other custom objective-c classes, without compile errors. (I had testet the header file by destroying some import statements and got the expected file not found exception.)
But now, I can't use any class of ZXingObjC
in my swift classes. I only got the following compile error: Use of undeclared type '...'
. The Xcode autocomplete is not working, too.
e.g.
var test : ZXMultiFormatWriter?
>> Use of undeclared type 'ZXMultiFormatWriter'
I tried:
- setup new project, same issue
- checked header search path:
$(SRCROOT)/Pods/Headers/Public/Adjust
- reinstalled the ZXingObjC framework
- checked build settings:
Enable Modules: YES
- checked build settings:
Other Linker Flags: $(inherited) -ObjC -framework "ZXingObjC"
- checked linked binaries in the build phases: framework is added
- checked import statement in the bridging header file (
#import <ZXingObjC/ZXingObjC.h>
and#import "ZXingObjC/ZXingObjC.h"
-- no difference) - Windows style: restarting Xcode and Mac ;-)
I'm using:
- Xcode: 6.3.2
- CocoaPods: 0.37.2
- Project Deployment target: iOS 8.0
- SDK: 8.3
Does anyone know the problem? Can anyone help? How can I make the ZXingObjC framework available in swift?