Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't build on ios8 iphone5s #3

Closed
DynamicLeo opened this issue Sep 21, 2014 · 4 comments
Closed

can't build on ios8 iphone5s #3

DynamicLeo opened this issue Sep 21, 2014 · 4 comments

Comments

@DynamicLeo
Copy link

I really like this plugin but when I build it on ios8 iphone5s with a error

ld: warning: ignoring file /Users/apple/eee/platforms/ios/eee/Plugins/org.cloudsky.cordovaplugins.zbar/libzbar.a, missing required architecture x86_64 in file /Users/apple/eee/platforms/ios/eee/Plugins/org.cloudsky.cordovaplugins.zbar/libzbar.a (3 slices)
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_ZBarReaderViewController", referenced from:
objc-class-ref in CsZBar.o
"_ZBarReaderControllerResults", referenced from:
-[CsZBar imagePickerController:didFinishPickingMediaWithInfo:] in CsZBar.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@tjwoon
Copy link
Owner

tjwoon commented Sep 21, 2014

Hi DynamicLeo,

Looks like the library file distributed by the ZBar team does not include
support for x86_64, which is required by the simulator only.

I think you would be able to compile for an actual device with no problems.

I will look into a way to include x86_64 support, but I can't promise when
I will be able to do it, so in the meantime, perhaps you can try this:
http://stackoverflow.com/a/24587494

Regards,
TJ
On Sep 21, 2014 9:19 AM, "DynamicLeo" notifications@github.com wrote:

I really like this plugin but when I build it on ios8 iphone5s it has some
wrong

ld: warning: ignoring file
/Users/apple/eee/platforms/ios/eee/Plugins/org.cloudsky.cordovaplugins.zbar/libzbar.a,
missing required architecture x86_64 in file
/Users/apple/eee/platforms/ios/eee/Plugins/org.cloudsky.cordovaplugins.zbar/libzbar.a
(3 slices)
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_ZBarReaderViewController", referenced from:
objc-class-ref in CsZBar.o
"_ZBarReaderControllerResults", referenced from:
-[CsZBar imagePickerController:didFinishPickingMediaWithInfo:] in CsZBar.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)


Reply to this email directly or view it on GitHub
#3.

@PaoloMessina
Copy link
Contributor

Hi All,
i've solved the problem in my project.
Download directly the zBar libs recompiled for x86_64 support from this link: http://www.nerdvision.net/app-development/ios/zbar-sdk

Then, replace the library into the ZbarSDK folder.

After that you can have this problem, if you try to debug the code it will block execution at the line 64, 65 of CsZBar.m:

// Hack to hide the bottom bar's Info button... http://stackoverflow.com/a/16353530
UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:1] subviews] objectAtIndex:0] subviews] objectAtIndex:3];
[infoButton setHidden:YES];

For now comment this two line of code, recompile and it works!

@botweb
Copy link

botweb commented Jan 29, 2015

Except of commenting the lines out (to be able to hide the info Button) as @PaoloMessina mentioned, you could also replace the first of these lines with the following line (the first index is now 2 except of 1):

UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:2] subviews] objectAtIndex:0] subviews] objectAtIndex:3];

@tjwoon
Copy link
Owner

tjwoon commented Feb 27, 2015

Compilation errors are now fixed for both x86_64 (Simulator) and 64-bit ARM, thanks to @PaoloMessina's pull request #11.

As mentioned by @botweb, the Info button in the iOS scanning view remains hidden.

@tjwoon tjwoon closed this as completed Feb 27, 2015
crissi pushed a commit to crissi/csZBar that referenced this issue Mar 9, 2016
wait until viewController is dismissed before callback, fixes tjwoon#47
lucaoliano pushed a commit to lucaoliano/csZBar that referenced this issue Oct 16, 2018
Ensure camera is open when changing its orientation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants