Powered By Blogger
Showing posts with label iPhone 6. Show all posts
Showing posts with label iPhone 6. Show all posts

Thursday, December 18, 2014

Steps to regenerate libzbar library for 64-bit architecture support.

Hi everyone,
After a long time, I'm back to share some useful things with you. In now a days, I'm busy to make my application 64-bit architecture devices support as per apple's guide line which must be followed before 1st February 2015. So, I have started to make third party libraries compatible to 64-bit architecture. For that, I choose libZbar and steps are as defined below : (iPhone 6 & 6 Plus support)
Step 1 : Download the source code (you must have Mercurial for mac):
Step 2 : Open Terminal and run following commands
        b. To Enter zbar directory command : cd zbar
        c. To checkout command : hg checkout iPhoneSDK-1.3.1
        d. To open project use this command : open iphone/zbar.xcodeproj
Step 3 : In the xcode project edit the "libzbar" scheme and select Release in Build configuration
Step 4 : Go to Build Settings set following Architectures
         a. Architectures - > Standard architectures(armv7,armv72,arm64)
         b. Valid Architectures -> arm64,armv7 armv7s
Step 5 : Compile libzbar for device AND for simulator, here the configuration:
Step 6 : Find the compiled libzbar.a and go in the folder using Teminal.app,
In My Case : /Users/Nell/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products
Step 7 : In this folder, you should have two sub folders namely "Release-iphoneos" and "Release-iphonesimulator".
Step 8 : using xcode command line tools build your universal lib:
      lipo -create Release-iphoneos/libzbar.a Release-iphonesimulator/libzbar.a -o libzbar.a
Now you can use the libzbar.a created, both in device and simulator.

Regards ,
Nilesh M. Prajapati