Skip to content

Issue: CaptureHelper.setDataConfirmation throws a native exception on iOS #22

@mstoner-aptos

Description

@mstoner-aptos

Your Socket Mobile Developer ID

b3889107-171f-f111-8341-6045bd03f534

Environment

iOS 26
react-native-capture 2.0.16
Device S740

Description

Our app's goal is to have the companion app set scan beep OFF, then force that beep behavior in the app via CaptureHelper's setDataConfirmation method at our discretion at runtime. When calling it, nothing happens with the scanner, and instead a exception is thrown which contains the following:

NSInvalidArgumentException: -[__NSDictionaryI integerValue]: unrecognized selector

Using AI, discovered this may be a bug with how CaptureHelper formats the value to the root capture JS SDK layer's setProperty. It appears its send an object instead of a bitwise integer, thus causing the iOS native layer to throw the exception in the property conversion layer here

Attaching AI summary of the issue

react-native-capture-issue-setDataConfirmation-ios.md

Steps to Reproduce

  1. Disable beep in companion app
  2. Launch the app using this SDK
  3. Call CaptureHelper.open()
  4. Wait for a connection
  5. call CaptureHelper.setDataConfirmation

Expected Behavior

good/bad beep will be done on scanner

Actual Behavior

promise rejects with a error: [__NSDictionaryI integerValue]: unrecognized selector sent to instance

Additional Context

Note that your current RN Single Entry sample app does not make this call, therefore may want to add that to that as well once fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions