1. 16 Sep, 2026 2 commits
    • Javokhir's avatar
      fix: preserve SDK defaults and make promise settling thread-safe · 44516365
      Javokhir authored
      Three paths overwrote SDK defaults instead of leaving them alone:
      
      - iOS assigned every appearance color unconditionally, so theming one color
        nil-ed the other eleven. MyIdAppearance seeds its own values.
      - An organizationDetails carrying only a logo replaced the whole details object,
        clearing the default call-centre number. It is now forwarded only when the
        caller supplied a field, and each field is assigned individually.
      - An unrecognised enum value called the setter with a guessed default. The guess
        was not always right: the SDK defaults imageFormat to JPEG while the fallback
        substituted PNG. Unknown values now skip the setter.
      
      Android settled a promise through a plain field touched by the JS, UI and
      native-modules threads, giving neither visibility nor an atomic check-then-set;
      a reload racing a start could wedge the module for the rest of the process. It
      is now an AtomicReference claimed with compareAndSet, and the result listener is
      scoped to a flow id so a late duplicate callback cannot settle a newer promise.
      
      iOS gained the invalidate path Android already had, confines its state to the
      main queue, and extends the proxy's lifetime across the settle callback that
      releases it.
      
      Documented defaults corrected against MyIdDefaults: imageFormat is JPEG,
      withSoundGuides is true, distance depends on camera shape, iOS floor is 15.1.
      44516365
    • Javokhir's avatar
      feat: add typed MyID JS API over codegen turbo module spec · 567d3cbb
      Javokhir authored
      Public surface is a promise-based start({config, iosAppearance}) mirroring the
      MyID Flutter plugin's wire format, with string-union enums, platform-scoped
      JSDoc and a MyIdError carrying the SDK result code.
      
      The codegen spec stays deliberately untyped for enums because codegen cannot
      express string unions; narrowing lives in the public layer only. Keys that are
      undefined are stripped before crossing the bridge so the SDK's own defaults
      survive rather than being overwritten with empty values.
      567d3cbb