{"id":484,"date":"2014-02-26T09:36:24","date_gmt":"2014-02-26T08:36:24","guid":{"rendered":"http:\/\/www.renaudpradenc.com\/?p=484"},"modified":"2014-02-26T09:36:24","modified_gmt":"2014-02-26T08:36:24","slug":"zbar-support-on-armv7-and-upper","status":"publish","type":"post","link":"https:\/\/www.renaudpradenc.com\/?p=484","title":{"rendered":"Zbar support on armv7 and upper"},"content":{"rendered":"<p>For one of my client project, I needed a QR code reader. I do know that <a title=\"Reading Barcodes on iOS 7\" href=\"https:\/\/www.renaudpradenc.com\/?p=453\">Apple introduced such a reader on iOS 7<\/a>, but I needed it to run on iOS 6 as well.<\/p>\n<p>Two open-source librairies looked like serious candidates at first:<\/p>\n<p><a title=\"Zbar\" href=\"http:\/\/zbar.sourceforge.net\/iphone\/\">Zbar<\/a><\/p>\n<p><a title=\"xzing\" href=\"https:\/\/github.com\/zxing\/zxing\">zxing<\/a><\/p>\n<p>zxing dropped support for the iOS platform recently. This leaves us with Zbar.<\/p>\n<h1>Zbar pre-compiled library does not support modern architectures<\/h1>\n<p>However, there is a problem with the Zbar library found in the SDK: it&#8217;s been compiled for the armv6, armv7 and i386 architectures only. Therefore, if your application supports more modern architectures like armv7s or arm64, it won&#8217;t link with the precompiled library.<\/p>\n<h1>Compiling from the source code<\/h1>\n<p>The solution is to compile Zbar yourself from the source code, which you can clone using Mercurial. You shall find explanations for <a href=\"http:\/\/www.federicocappelli.net\/2012\/10\/05\/zbar-library-for-iphone-5-armv7s\">Xcode 4 here<\/a>, and <a href=\"http:\/\/stackoverflow.com\/questions\/18740304\/linker-error-in-xcode-5\/18937831#18937831\">Xcode 5 here<\/a>.<\/p>\n<p>However, there is an easier way. Someone had the great idea to clone the original Mercurial repository to <a href=\"https:\/\/github.com\/ZBar\">github<\/a> and also created a Podspec, so Zbar may be included in your project using <a href=\"http:\/\/cocoapods.org\">Cocoapods<\/a>.<\/p>\n<p>In your Podfile, write:<\/p>\n<pre class=\"lang:default decode:true\">pod 'ZBarSDK', '~&gt; 1.3.1'<\/pre>\n<p>and voil\u00e0! You might still need the <a href=\"http:\/\/zbar.sourceforge.net\/iphone\/sdkdoc\/index.html\">documentation for the Zbar SDK<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For one of my client project, I needed a QR code reader. I do know that Apple introduced such a reader on iOS 7, but I needed it to run on iOS 6 as well. Two open-source librairies looked like serious candidates at first: Zbar zxing zxing dropped support for the iOS platform recently. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[89],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","hentry","category-english"],"_links":{"self":[{"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=484"}],"version-history":[{"count":3,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=\/wp\/v2\/posts\/484\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.renaudpradenc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}