Search code examples
iosxcodezbari386

Symbol(s) not found for architecture i386 zbar


compile error

I can't run my application cause of this crazy error. Everything ran great before I updated from Xcode 6 to 7.


Solution

  • You have to import AVFoundation and AudioToolbox frameworks and also set i386 armv6 armv7 armv7s architectures needed for running the libraries.

    OR

    The 7 frameworks need to be in the following order:

    Foundation.framework
    CoreGraphics.framework
    UIKit.framework
    AVFoundation.framework
    CoreMedia.framework
    CoreVideo.framework
    QuartzCore.framework
    libiconv.dylib
    libzbar.a
    

    I wasn't aware the order the frameworks are declared in the Build Phases mattered. Anyways, hopefully for anybody trying to integrate a barcode scanner into their app, this answer will be useful.