Swift: build fails but no errors

I am currently trying to implement this GitHub: https://github.com/yeahdongcn/RSBarcodes_Swift I followed the instructions below:

  • Add RSBarcodes_Swift as a submodule by opening a terminal, cd-ing to the top level project directory and entering git subodule add https://github.com/yeahdongcn/RSBarcodes_Swift.git

    Added without errors

  • Open the RSBarcodes_Swift folder and drag RSBarcodes.xcodeproj to the file navigator of your application project.

    I guess he meant the project navigator I made

  • In Xcode, go to the target configuration window by clicking the blue project icon and selecting the target application program under the Targets heading in the sidebar. Make sure the RSBarcodes.framework deployment target matches the application target.

    Yup, set to 7.1

  • From the tab bar at the top of this window, open the Phase Build panel. Expand the Target Dependencies group and add RSBarcodes.framework.

    Coudn't add 'RSBarcodes.framework' as it only gave me the option for "RSBarcodes" which I added as the alleged .framework was added incorrectly

  • Click the + button in the upper left corner of the panel and select New Phase of Copy Files. Rename this new stage to "Copy Frameworks", set "Destination" to "Frameworks" and add RSBarcodes.framework.

    Added No problem

The following set of instructions:

Put the UIViewController in your storyboard and set the RSCodeReaderViewController class as your custom class and it's almost there, the focus layer and the corners layer are already working for you. There are handlers, one for one tap on the screen along with the focus mark and the other is a detected object handler that will detect everything, come to you. Set them up in viewDidLoad () or somewhere else:

override func viewDidLoad() {
super.viewDidLoad()

self.focusMarkLayer.strokeColor = UIColor.redColor().CGColor

self.cornersLayer.strokeColor = UIColor.yellowColor().CGColor

self.tapHandler = { point in
    println(point)
}

self.barcodesHandler = { barcodes in
    for barcode in barcodes {
        println(barcode)
    }
}
}

      

I followed them, the only thing I did differently was add a UIButton to the main ViewController and add performSegueWithIdentifier to show the RSCodeReaderViewController as it was not available

I have uploaded the project here: http://www.filedropper.com/barcodetestreader if you want to see it. Can someone please tell me what is going on or if you are facing any errors?

+3


source to share


2 answers


Do not do that:

Yup, set to 7.1

Everything is good!

Don't add 'RSBarcodes.framework' as it only gave me the option "RSBarcodes" which I added as the alleged .framework was added incorrectly. You must add RSBarcodes! Without .frameworks!



Do this and it will work:

From the tab bar at the top of this window, open the Phase Build panel. Expand the Link Binary With Libraries group and add RSBarcodes.framework.

Good luck :)

+1


source


Currently, you can use CocoaPods () or Carthage to install RSBarcodes_Swift.

CocoaPods:

pod 'RSBarcodes_Swift', '~> 0.0.5'

in your subpixel.



Carthage:

github "yeahdongcn / RSBarcodes_Swift"> = 0.0.5

in your Cartfile.

0


source







All Articles