jonathannaguin / BarcodeScanner

cross-platform BarcodeScanner for Cordova / PhoneGap
53 stars 30 forks source link

Build errors with iOS SDK 7.1, Xcode 5.1 5B130a #3

Closed austinjackson closed 10 years ago

austinjackson commented 10 years ago

An app with the plugin installed won't build on the latest Xcode when deploying to a 64 bit device. There is some information at the link below that provides a fix for the main cordova project.

http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/

jonathannaguin commented 10 years ago

I changed the architecture of the plugin to have "Standard architectures (armv7, armv7s, arm64)". I haven't tested but I think it should work with the latest version of Cordova.

austinjackson commented 10 years ago

Getting an error when running "cordova build" with the patch:

ld: warning: ignoring file /com.phonegap.plugins.barcodescanner/libZXingWidgetLibrary.a, missing required architecture i386 in file /com.phonegap.plugins.barcodescanner/libZXingWidgetLibrary.a (2 slices) Undefined symbols for architecture i386: "_OBJCCLASS$_ZXingWidgetController", referenced from: objc-class-ref in CDVBarcodeScanner.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

jonathannaguin commented 10 years ago

Are you trying to build against the iOS Simulator? The library won't work in the simulator because there isn't a way to use the camera of the Mac.

austinjackson commented 10 years ago

Nope. Just running "cordova build" to get an Xcode project, then deploying to Retina iPad mini and iPhone 5 from Xcode.

jonathannaguin commented 10 years ago

I uploaded again the library. Try again :)

austinjackson commented 10 years ago

No go. "cordova build" throws a bunch of errors. If I ignore them and open the project in Xcode and attempt to build, I get 39 Apple Mach-O Linker Errors.

jonathannaguin commented 10 years ago

Can you provide the output? I have tried on my machine and it was working fine, but I don't have a 64 bits device... Yet

jeeff commented 9 years ago

I have a same problem and hopefully found a solution. Everythink worked when i have a project with deploying target set fo 6.0. But when i change it to 7.0 or 8.0 there was a lot of i386 linker errors. I was searching for solutions for two days. I found a solution here:

http://stackoverflow.com/questions/19271856/undefined-symbols-for-architecture-error-when-deployment-target-is-7-0

the solution is to include the 'stdc++.6.0.9.dylib' in xcode at tab Build Settings -> Link binnary with libraries.

Thanks for your barcode scanner ;-)