When you build you can specify what type of build to do:
cordova compile --device
or for i386:
cordova compile --emulator
That's what fixed it for me.
Question
I'm getting an error in my build (using cordova 3.4):
Undefined symbols for architecture i386:
"_iconv", referenced from:
zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
"_iconv_close", referenced from:
zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
"_iconv_open", referenced from:
zxing::qrcode::DecodedBitStreamParser::append(std::string&, unsigned char const*, unsigned long, char const*) in zxing-all-in-one.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
I'm pretty sure this comes from the phone gap QR scanner plugin, but I don't think it should be building i386 at all. The qrcode scanner seems not to have a library of that architecture.
How can I tell cordova not to build i386? Or did i miss something?
Solution
When you build you can specify what type of build to do:
cordova compile --device
or for i386:
cordova compile --emulator
That's what fixed it for me.
OTHER TIPS
I've been struggling with this for a few days too. I followed the guidance in Snips answer here to get it working for me