Skip to content

Release 3.0.5 - #57

Merged
djordjeh merged 21 commits into
masterfrom
develop
Aug 18, 2026
Merged

Release 3.0.5#57
djordjeh merged 21 commits into
masterfrom
develop

Conversation

@djordjeh

Copy link
Copy Markdown
Contributor

No description provided.

shekar-allam and others added 20 commits March 17, 2026 15:52
Replace custom expect/actual ImageBitmap with androidx.compose.ui.graphics.ImageBitmap
from Compose Multiplatform as the unified cross-platform image abstraction.

- Use Compose ImageBitmap directly across all modules (no typealias indirection)
- Implement iOS encodeToBase64() via Skia PNG encoding
- Implement iOS BarcodeEncoder using CoreImage (CIQRCodeGenerator, CICode128BarcodeGenerator)
- Convert Android plugin controllers (Star, Epson, Sunmi) to use asAndroidBitmap() at SDK boundary
- Android BarcodeEncoder returns Compose ImageBitmap via asImageBitmap()
- Add Compose plugins to print-engine, star, and epson modules
- Update all test files for new ImageBitmap type conversions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…OS printing

- Remove INFOPLIST_KEY_UIApplicationSceneManifest_Generation from project.pbxproj
  to prevent auto-enabling UIApplicationSupportsMultipleScenes=true, which caused
  Compose to render into zero-size frames on iPad (Stage Manager / multi-window)
- Add UIApplicationSceneManifest{UIApplicationSupportsMultipleScenes=false} and
  NSBluetoothAlwaysUsageDescription to Info.plist; without the Bluetooth key iOS
  silently terminates any app linked against CoreBluetooth on physical devices
- Wrap Epos2Discovery.start() in withContext(Dispatchers.Main) — Epson SDK requires
  the iOS main thread for discovery start/stop
- Implement EpsonPrinterController, EpsonPrintService, EpsonServiceProvider,
  StarServiceProvider, EpsonPrinterErrorState iOS actuals (replace TODO stubs)
- Add nativeInterop cinterop def + README for Epson ePOS2 SDK integration
- Wire up MainViewController to live printer discovery and print job dispatch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…thread safety

- Fix all ePOS2.h enum constants to match actual SDK header values:
  EPOS2_MECHANICAL_ERR 0→1, AUTOCUTTER_ERR 1→2, UNRECOVER_ERR 2→3,
  AUTORECOVER_ERR 3→4, CODE_PRINTING 1→13, LOW_VOLTAGE_ERR 0→1
- Add EPOS2_NO_ERR and EPOS2_UNKNOWN checks in evaluateStatusInfo
- Check every Epson SDK return code via checkSdkResult() — iOS SDK
  returns int error codes unlike Android which throws Epos2Exception
- Guard disconnect() — only call if connect() succeeded
- Close SkiaBitmap/SkiaImage after use to prevent native memory leaks
- Extract shared ImageBitmap.encodeToPngBytes() utility
- Replace remember{scope.launch} with LaunchedEffect(Unit)
- Use flowOn(IO) + collect on Main to avoid mutating Compose state
  from background dispatcher
- Replace leaked module-level CoroutineScope with rememberCoroutineScope()
- Guard startPrintJob behind initialized check
- Fall back to TM-T88 for unknown printer models instead of crashing
- Close SkiaImage in BarcodeEncoderImpl after toComposeImageBitmap()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ocol

- Show discovery state (searching/found/error) in the sample UI so
  connection issues are immediately visible on device
- Add UISupportedExternalAccessoryProtocols with com.epson.escpos to
  Info.plist for MFi Bluetooth/USB printer discovery
- Fix initialized flag to use mutableStateOf so it survives recomposition

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip all printer discovery code from this branch to keep it focused
on core iOS printing infrastructure. Discovery will be added as a
separate feature in the UNTIL-19514 branch.

Removed:
- EpsonPrinterDiscovery.ios.kt implementation (reverted to TODO stub)
- Discovery flow collection and discoveryStatus from MainViewController
- discoveryStatus parameter from PrinterLayout
- Discovery permissions from Info.plist (Bluetooth, LocalNetwork,
  Bonjour, ExternalAccessory)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement full Epson printer discovery on iOS using the ePOS2 SDK:

- EpsonPrinterDiscovery.ios.kt: callbackFlow-based discovery using
  Epos2Discovery with Epos2FilterOption (all ports, printer type).
  Dispatches start() to Main thread, references delegate in awaitClose
  to prevent GC, maps device info to ExternalPrinter model
- MainViewController: LaunchedEffect-based discovery flow collection
  with discoveryStatus state (Idle/Discovering/Error), flowOn(IO)
  for background work with Main-thread Compose state updates
- PrinterLayout: discoveryStatus parameter showing search progress
- Info.plist: NSBluetoothAlwaysUsageDescription, NSLocalNetworkUsageDescription,
  NSBonjourServices, UISupportedExternalAccessoryProtocols for
  Bluetooth/LAN/USB printer discovery permissions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Gradle task to auto-download Epson ePOS SDK xcframework on first
  iOS build, eliminating manual setup steps
- Consolidate SDK config into EpsonSdk object with centralized version,
  repo URL, and architecture slice constants
- DRY up iOS target configuration with configureEpsonInterop() extension
- Move EpsonServiceProviderTest from instrumented to unit test with
  proper null-guard coverage
- Update nativeInterop README with auto-download instructions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ekar/task/UNTIL-19514/print-engine-epson-ios-support
- Add Gradle task to auto-download Epson ePOS SDK xcframework on first
  iOS build, eliminating manual setup steps
- Consolidate SDK config into EpsonSdk object with centralized version,
  repo URL, and architecture slice constants
- DRY up iOS target configuration with configureEpsonInterop() extension
- Move EpsonServiceProviderTest from instrumented to unit test with
  proper null-guard coverage
- Update nativeInterop README with auto-download instructions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ekar/task/UNTIL-19514/print-engine-epson-ios-support

# Conflicts:
#	print-plugins/epson/build.gradle.kts
#	print-plugins/epson/src/androidUnitTest/kotlin/de/tillhub/printengine/epson/EpsonServiceProviderTest.kt
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nts directly

Enable cinterop commonization so Epson SDK constants (enums, #defines) are
available in the shared iosMain source set. Replace ~60 hardcoded constants
with direct imports from com.epson.epos2.

Add a UIKit shim header that imports only UIImage.h instead of all of UIKit,
preventing the commonizer from crashing on platform-specific UIKit types
(UIMenuSystemElementGroupPreference) that differ across iOS targets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ral only

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ine-epson-ios-support

[UNTIL-19514] Print engine epson ios support
…ine-kmp-3.0.5

[UNTIL-19417] Migrate ImageBitmap to Compose Multiplatform & add iOS sample app
@djordjeh
djordjeh requested a review from a team as a code owner April 23, 2026 06:59
@djordjeh
djordjeh merged commit 80bc077 into master Aug 18, 2026
2 checks passed
@djordjeh
djordjeh deleted the develop branch August 18, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants