Skip to content

[SDC-32336] Add Kotlin Multiplatform as a documented platform#380

Draft
ilber wants to merge 8 commits into
mainfrom
feature/SDC-32336
Draft

[SDC-32336] Add Kotlin Multiplatform as a documented platform#380
ilber wants to merge 8 commits into
mainfrom
feature/SDC-32336

Conversation

@ilber

@ilber ilber commented Jul 2, 2026

Copy link
Copy Markdown
Member

What

Adds Kotlin Multiplatform as a documented platform (SDC-32336): framework wiring, install guide, and the full product page set.

Framework wiring

  • Selector/navbar dropdown, homepage card (new mono Kotlin icons matching siblings), kmpSidebar, FRAMEWORK_MAPPING, SkillsCallout maps, products.json, llmsNonWebSdkRoots.
  • Navbar entry routes through /next explicitly (unreleased: true flag in useFrameworkItems.js): KMP has no versioned_docs snapshot yet; the generic versioned-link formula produced 1909 broken links site-wide.
  • docs/sdks/kmp excluded from the Kotlin snippet validator — it compiles against the Android SDK classpath; KMP snippets need a KMP toolchain (com.kmp.* klibs, unpublished pre-8.6).

Install guide (add-sdk.mdx)

  • Gradle/Maven Central for Android/shared code, module table (group com.scandit.datacapture.kmp), Compose -compose companion modules.
  • iOS via SPM, both integration paths:
    • Prebuilt umbrella package (datacapture-kmp-spm, per SDC-32242) — incl. the one-ScanditKmp*-product-per-app closed-world callout and the Swift Companion.shared bridging example (all params explicit; Kotlin defaults don't export to Swift).
    • Apps with their own shared module (per SDC-32485 resolution) — manual datacapture-spm Exact Version pin matching the Maven version, KMP-module → native-SPM-product mapping table, concrete core+barcode example, upgrade rule (Gradle bump and Xcode pin move together).

Product pages (34)

SparkScan, Barcode Capture, Barcode Selection, MatrixScan (Batch/AR/Count/Find/Pick), Barcode Generator, ID Capture, Smart Label Capture, Parser, plus shared symbology/system-requirements pages. Sidebar mirrors flutter's structure (minus agent-skills, API reference, and migration guides, which don't exist for KMP yet). APIs not shipped in KMP are omitted rather than carried over from other frameworks' pages.

Verification

Every Kotlin/Swift snippet derived from the KMP samples / module sources. Two passes:

  1. Authoring-time symbol verification against the SDK monorepo (listener signatures, toAndroidView package, Compose SparkScanView params, newlyRecognizedBarcode).
  2. Full post-authoring sweep: 28 pages re-verified line-by-line against frameworks/kmp sources (class/method/param names, order, nullability, defaults, enums, lifecycle claims). Findings, all fixed: Swift initialize call missing required params, setShouldPassImageTypeToResult prose contradicting its own snippet, one unused import.

Deliberately out (follow-ups)

  • skills.json / agent-skills page — no published KMP skill packages yet; entries would fabricate links.
  • features-by-framework.mdx — shared partial has no KMP column; needs a shared-partial edit.
  • Unwired APIs skipped rather than documented: BarcodeCountCaptureList, pick custom-view providers, tote mapping, MatrixScan AR advanced page.

Local validation

npm run build (broken links/anchors/routes = throw) ✅ · npm run typecheck ✅ · standards + spec reviews: 0 blocking.

🤖 Generated with Claude Code

Wires kmp into the framework selector, navbar, homepage cards, sidebar,
and products data, and adds docs/sdks/kmp with the install guide and a
SparkScan getting-started. Navbar entry routes through /next explicitly:
KMP has no versioned_docs snapshot yet, so the generic versioned link
formula would 404 site-wide. KMP snippets are excluded from the Android
snippet validator (they need a KMP toolchain, not the Android classpath).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ilber ilber added the 8.6 label Jul 2, 2026
ilber and others added 5 commits July 2, 2026 14:50
Adds the single-scanning + ai-powered landing pages the active card
block links to, and routes the card through /next (no versioned
snapshot for kmp yet).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Barcode Capture, Barcode Selection, MatrixScan (Batch/AR/Count/Find/
Pick), Barcode Generator, ID Capture, Smart Label Capture, Parser, plus
shared symbology/system-requirements pages. Sidebar mirrors flutter's
structure (minus agent-skills, API reference, and migration guides,
which don't exist for KMP yet); products.json and the homepage card now
list every documented product. All Kotlin snippets verified against the
KMP module sources and samples; APIs not shipped in KMP are omitted
rather than carried over from other frameworks' pages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Kotlin interfaces export as Swift protocols, so companion factories are
DataCaptureContextCompanion.shared.*, not statics or .companion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Swift init needs all params (Kotlin defaults don't export to Swift);
setShouldPassImageTypeToResult is a settings method, not creation-time;
drop unused FullDocumentScanner import.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ilber

ilber commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@moritzhartmeier this is targeting 8.6.

ilber and others added 2 commits July 2, 2026 22:35
Per SDC-32485 resolution: manual datacapture-spm exact-version pin +
per-module product table, instead of a shipped Gradle plugin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plain-language pass on add-sdk.mdx: replace "closed worlds"
jargon, split dense Swift-bridging and own-shared-module
passages. No snippet/API changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant