iosxcodeswiftrsbarcodes

Swift CocoaPod is clickable but not findable for Xcode


I use the CocoaPod RSBarcodes_Swift to work with barcodes. The installation was successful and if I open the *.xcworkspace file I can see the source files for the pod.

The problem:

If I'm typing lines like class FirstViewController: RSCodeReaderViewController Xcode cannot include / find / use this view controller class but nevertheless, I can Cmd+Click on the word to jump to the actual file. The same happens if I try to use statements like import RSBarcodes.


Solution

  • never trust a web's manual. You have to use the import statement:

    import RSBarcodes_Swift

    Now it seams to work. My lessons learned: Understand in which cases you have to use an import statement and in which cases not.