ZBar with iOS7 and XCode5 compiling error libzbar.a architecture
Asked Answered
C

7

8

just got some errors runnign ZBar with my iOS App.

I included the newest Beta Version 1.3.1 in my Project and am Running the App locally on my iOS7 Device (iPhone 5).

When trying to archive it for Distribution, there is the error with arm64.

I've tried to recompile the source to generate my own libzbar.a (which was generated) with selected arm64 armv7 and armv7s, but even here the error was the same..

So what should I do?

archive error

Thnaks for help!

Cosmotron answered 15/1, 2014 at 14:46 Comment(0)
S
31

You can download the zbar library compiled for arm7, arm7s and arm64 here

EDIT: I am still getting upvotes on this answer, the real current answer is that now the AV Foundation framework includes barcode scanning as of iOS 7. I would recommend using this over ZBar from here on out. Useful tutorial using AV Foundation to scan with sample code and supported types list or here

Serna answered 1/5, 2014 at 14:43 Comment(5)
Switched just the .a file for this one and it works!Jasisa
that does work great, any chance of adding i386 to it as well so I can still run app in simulator ?Keg
sorry and "missing required architecture x86_64"Keg
never mind followed instructions (linked below) to build it myself. Took 5 minutes, upvoted it as well should really be the accepted answer.Keg
Note: You have to add both libzbar.a and libzbar-sim.a or you get the i386 link error of death.Intercalate
C
4

above answers don't really help

follow this guide:

http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/

But before building change the Architectures to include arm64

Cali answered 26/3, 2014 at 23:56 Comment(0)
J
4

I was on the ZBar train as well for quite a while dealing with these issues since they have not been updating the SDK. Luckily if your app only has to support iOS7 onwards (which most iOS users are on now!) there is now QR Code reading support in AVFoundation so you can build your own reader very easily. Check out this tutorial:

http://www.appcoda.com/qr-code-ios-programming-tutorial/

Then bask in the beauty that is a totally Apple supported QR Code reader!

Jasisa answered 1/10, 2014 at 18:6 Comment(0)
W
1

Using the beta you linked and changing this setting worked for me:

enter image description here Settings that worked:

enter image description here

I am able to build to the 5s and 5c.

Woodchuck answered 13/2, 2014 at 2:56 Comment(0)
B
0

Try only armv7, armv7s for "Architectures" build settings. I think static library doesn't have arm64 binaries included.

For more info

Xcode 5 and iOS 7: Architecture and Valid architectures

Bunnell answered 15/1, 2014 at 15:7 Comment(0)
M
0

Here (http://zbar.sourceforge.net/iphone/sdkdoc/install.html) is the installing SDK guide, I did this and it worked perfectly.

Hope it helps.

Miran answered 17/1, 2014 at 11:0 Comment(0)
R
0

How i resolve the problem is link binary with libraries. Base on the tutorial here

Now Select project (Blue Icon) go to --> Build Phases --> Link Binary With Libraries. Click the + and add each of these seven frameworks.

  • AVFoundation.framework
  • List item
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreAudio.framework
  • CoreVideo.framework
  • QuartzCore.framework
  • libiconv.dylib (I use libz.tbd & libicon.tbd)

enter image description here enter image description here

**set enable bitcode --> No build! hope this help.

Reisinger answered 10/5, 2016 at 2:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.