评论 (12)
  • 添加评论
  • 编辑
  • 更多操作 v
  • 隔离此条目

1 bcliao 发表了评论 永久链接

Thanks for your detailed tutorial. I followed your steps to test BarcodeScanner plugin, but got following error while clicked the barcode image. Do you have any idea or clue of this error? Thanks !
2013-02-27 22:24:39.985 BarcodeScanner[4858:c07] [LOG] calling cordova barcodeScanner!!
2013-02-27 22:24:39.992 BarcodeScanner[4858:c07] -[NSNull count]: unrecognized selector sent to instance 0x3ec2678
2013-02-27 22:24:40.066 BarcodeScanner[4858:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull count]: unrecognized selector sent to instance 0x3ec2678'
*** First throw call stack:
(0x3d91012 0x2c6ae7e 0x3e1c4bd 0x3d80bbc 0x3d8094e 0x3d6edeb 0x271961 0x2c698e 0x2c6237 0x2c5e2d 0x2c5f8c 0x2c5ed3 0x2c7e6b0 0xa43035 0x3d14f3f 0x3d14a39 0x3d37734 0x3d36f44 0x3d36e1b 0x35c67e3 0x35c6668 0xddf65c 0x3196 0x30c5 0x1)
libc++abi.dylib: terminate called throwing an exception
(lldb)

2 deepuev 发表了评论 永久链接

i am also getting the same error as bcliao

3 timdp 发表了评论 永久链接

Hi! The fact you've pasted the log file and said "clicked the barcode image" suggest to me that you're using the iOS simulator? Can you confirm please?

 
From the end of section 3: "You should now be in a position to try this out on your device. Note that you can't test the app in the iOS simulator, as the camera isn't simulated."

4 deepuev 发表了评论 永久链接

I tried on device . below is the device crash log from device .

 
Last Exception Backtrace:
0 CoreFoundation 0x3410a3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x3be0595e objc_exception_throw + 26
2 CoreFoundation 0x3410df2c -[NSObject(NSObject) doesNotRecognizeSelector:] + 180
3 CoreFoundation 0x3410c648 ___forwarding___ + 388
4 CoreFoundation 0x34064204 _CF_forwarding_prep_0 + 20
5 CoreFoundation 0x3406881c +[NSArray arrayWithArray:] + 40
6 InStoreApp 0x001a5458 -[CDVInvokedUrlCommand legacyArguments:andDict:] + 56
7 InStoreApp 0x001cfb36 -[CDVCommandQueue execute:] + 446
8 InStoreApp 0x001cf898 -[CDVCommandQueue executePending] + 456
9 InStoreApp 0x001cf5f0 -[CDVCommandQueue enqueCommandBatch:] + 80
10 InStoreApp 0x001cf6c2 -[CDVCommandQueue fetchCommandsFromJs] + 102
11 InStoreApp 0x001cf64c -[CDVCommandQueue maybeFetchCommandsFromJs:] + 80
12 Foundation 0x34a2249c __NSThreadPerformPerform + 456
13 CoreFoundation 0x340df8f2 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
14 CoreFoundation 0x340df158 __CFRunLoopDoSources0 + 208
15 CoreFoundation 0x340ddf2a __CFRunLoopRun + 642
16 CoreFoundation 0x34051238 CFRunLoopRunSpecific + 352
17 CoreFoundation 0x340510c4 CFRunLoopRunInMode + 100
18 GraphicsServices 0x37c30336 GSEventRunModal + 70
19 UIKit 0x35f6d2b4 UIApplicationMain + 1116
20 InStoreApp 0x000c2c16 main (main.m:21)
21 libdyld.dylib 0x3c232b1c start + 0

5 deepuev 发表了评论 永久链接

Hi,
It was my mistake . when i passed ["scannerOverlay"] , then it started working . Thank you ......

 
Deepak E V

6 JigneshSampat(ISL) 发表了评论 永久链接

Thanks for the detailed tutorial.
I followed everything. But on click of the image nothing is happening.
I m using WL506.
I have updated the config.xml also.

7 David Whitehouse 发表了评论 永久链接

Thanks for the step-by-step instructions. One thing to note is that in Worklight Version 6 there is no Cordova.plist file. The configuration has moved into config.xml in the top level of the native folder. Just add the following line under the other cordova plugins.

 
<plugin name="org.apache.cordova.barcodeScanner" value="CDVBarcodeScanner" />

8 timdp 发表了评论 永久链接

Thanks David, I've added a pointer to the comments at the top of the tutorial for people using Worklight 6.

9 Kriersd 发表了评论 永久链接

If your using Worklight V6.0.0 here are some things you need to be aware of.

 
Make sure you are using the right version of the Plugin (downloaded from GitHub). It must be compatible with Cordova 2.6, which is what Worklight v6.0.0 uses under the covers. DO NOT USE the 3.0 version.
 
There is a bug in Cordova 2.6 that will prevent you from compiling in Xcode. You need to apply this patch to the Cordova lib (CDVPlugin.h) code.
Replace these 4 lines
NSString* const CDVPageDidLoadNotification;
NSString* const CDVPluginHandleOpenURLNotification;
NSString* const CDVPluginResetNotification;
NSString* const CDVLocalNotification;
 
with this
extern NSString* const CDVPageDidLoadNotification;
extern NSString* const CDVPluginHandleOpenURLNotification;
extern NSString* const CDVPluginResetNotification;
extern NSString* const CDVLocalNotification;

10 Kriersd 发表了评论 永久链接

here is the link that explains the bug in Cordova 2.6

 
https://github.com/wildabeast/BarcodeScanner/issues/15

11 timdp 发表了评论 永久链接

Thanks for your input Kriersd!

12 satyamallya 发表了评论 永久链接

Hi Tim,

 
 
 
I am using Xcode 5 and worklight 5.0.6. I am trying to compile the app for xcode barcode scanner tutorial. I am an altera IT developer and am a customer of worklight from IBM.
 
 
 
https://www.ibm.com/developerworks/community/blogs/worklight/entry/using_cordova_plugins_in_worklight_native_barcode_scanning_for_ios15?lang=en
 
 
 
I think something is jumbled in the tutorial and I am missing something
 
From your page
>>Once you've added them all, you should have:
 
>>to CDVbcsViewController. This tells Xcode which code should sit behind this user interface: - defunct link
 
>>. From the pop-up select overlayView: -defunct link
 
 
The screens don't correspond to what I see. There is no CDVbcsViewController in my implementation. Am I missing somthing. I have done everything all the way to the link binary image. I appreciate any help.
 
 
 
Thanks
 
Satya