NativeScript / mlkit

Apache License 2.0
24 stars 9 forks source link

iOS & Android bug: Please fix difference in signature of onDetection method #21

Closed cjohn001 closed 2 years ago

cjohn001 commented 2 years ago

The (detection)="OnDetection($event)" method has different signature when called on Android and on IOS. On Android the barcode is an object which was serialized as a string, on iOS it is a javascript object, see screenshots below.

iOS:

iosEvent

Android:

androidEvent

It would be great to have the iOS variant (javascript object) consistently on both platforms. It would also be great to have typescript typings for the entire barcode object in the event. Currently, the type is simply data: { [key: string]: any };

triniwiz commented 2 years ago

That's a bug the return value should be any array of objects not strings

kriefsacha commented 2 years ago

Same here, tested on android, data is type

data: { [key: string]: any };