zbar SDK dont work for armv7s(iPad 4 iOS 7)
Asked Answered
E

6

10

I replace zBar SDK in my project and faced with the problem.

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Volumes/ZBarSDK/ZBarSDK/libzbar.a file '/Volumes/ZBarSDK/ZBarSDK/libzbar.a' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I downloaded SDK from http://nerdvision.net/app-development/ios/zbar-sdk

P.S. In simulator it work.

Emplane answered 14/10, 2013 at 13:34 Comment(1)
I tried several suggestions centered around the "turning off armv7s" or changing 'Build Active Architecture Only' values ... none of those worked for me. I am running an iPad 3 and iOS v7.0.4. Used the link provided below via "MarkDotNet" for Federico's suggestion of simply rebuilding the ZBar source code so it will be compliant on the newest hardware/OS's. Worked like a charm.Lorant
C
15

You can use a custom version of ZbarSdk built for iOS 7, which can be found here : http://nerdvision.net/app-development/ios/zbar-sdk

Cofer answered 21/10, 2013 at 12:40 Comment(1)
@Jeremie : I've just tried the link provided, and it seems that it is working for now. Maybe you can try it again ?Cofer
G
8

I didn't have any luck with the NerdVision version, but using this one worked for me immediately.

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

Gupta answered 9/12, 2013 at 15:18 Comment(0)
M
1

You can download the library compiled for arm7, arm7s and arm64 here (the nerdvision link is dead)

Messiaen answered 1/5, 2014 at 14:41 Comment(0)
P
0

Turn off armv7s in your project architecture settings. It's not really necessary unless you or a library needs the few additional instructions. All it generally does is add "Optimized for iPhone 5" in the app store description.

Phila answered 14/10, 2013 at 13:56 Comment(0)
S
0

I just upgrade my Xcode 5.1 and iOS 7. When it is compiled onto simulators, it works without problem. When it is compiled onto iPhone 5s running under iOS 7, it is getting an error of linker command. After turn off armv7s, it works fine.

Sheba answered 11/4, 2014 at 6:24 Comment(0)
D
0

I've created a framework using this link and the source code of the ZBarSDK. You can download the framework here. Just unzip the ZBarFramework.framework and drag it in your project. All headers in there are public. To use the framework in code you just have to import the header files.

#import <ZBarFramework/ZBarSDK.h>

// Example Controller
@interface SomeQRViewController : UIViewController <ZBarReaderViewDelegate>
@property (nonatomic, strong) IBOutlet ZBarReaderView *readerView;

@end
Delastre answered 5/9, 2014 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.