ia-sdk-react-native-monorepo - v1.0.0
    Preparing search index...

    ia-sdk-react-native-monorepo - v1.0.0

    AppSDK React Native Module

    React Native Module project implemented with the ia.de AppSDK services.


    The plugin implementation is based on the native AppSDK libraries developed by the ia.de team with Kotlin and Swift.

    These native libraries offer both checkout services as well as view components in order to ensure seamless integration with any client setup.

    Public API Reference: https://ihreapotheken.github.io/docs/appsdk/react-native



    The library is supported on both of the major mobile operating systems, with constraints noted below:

    • Minimum SDK Version: 30
    • Target SDK Version: 36
    • Kotlin 2.1.0
    • Gradle 8.12.3
    • Minimum iOS Version: 15
    • Xcode: 16.0
    • Swift 5.9

    For official reference, please see the React Native documentation on using libraries.

    The library is accessed from GitHub NPM Package Registry.

    Create a .npmrc file in the root of your project:

    @ihreapotheken:registry=https://npm.pkg.github.com
    //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT

    Replace YOUR_GITHUB_PAT with your GitHub Personal Access Token.

    Install the core package and the modules you need:

    # Core package (required)
    npm install @ihreapotheken/ia-sdk-core@VERSION

    # Install only the modules you need
    npm install @ihreapotheken/ia-sdk-cardlink@VERSION
    npm install @ihreapotheken/ia-sdk-pharmacy@VERSION
    npm install @ihreapotheken/ia-sdk-ordering@VERSION
    npm install @ihreapotheken/ia-sdk-prescription@VERSION
    npm install @ihreapotheken/ia-sdk-over-the-counter@VERSION

    The VERSION value can be referenced from the package release page.

    Add the following keys to your Info.plist file based on the modules you use:

    
    NSLocationWhenInUseUsageDescription
    Used to show pharmacies nearby.
    
    
    NSCameraUsageDescription
    Camera access is needed for prescription upload.
    
    
    NFCReaderUsageDescription
    NFC is used to read your health insurance card for prescription redemption.
    com.apple.developer.nfc.readersession.iso7816.select-identifiers
    
        D2760001448000
        D27600014601
        D27600014606
        D27600000102
        A000000167455349474E
        D27600006601
        D27600014602
        E828BD080FA000000167455349474E
        E828BD080FD27600006601
        D27600014603
    
    
    Permission Key Required For Purpose
    Location (When In Use) NSLocationWhenInUseUsageDescription Apofinder module Find nearby pharmacies and get directions
    Camera NSCameraUsageDescription Prescription (RX) module Scan and upload prescriptions via camera
    NFC NFCReaderUsageDescription CardLink module Read health insurance cards via NFC for prescription redemption

    Note: The com.apple.developer.nfc.readersession.iso7816.select-identifiers key with the listed AIDs is required for CardLink to communicate with German health insurance cards (eGK) and related secure messaging protocols.

    The SDK uses a modular architecture. Register only the modules you need to minimize app size:

    import { iaSdk, ServerEnvironment } from '@ihreapotheken/ia-sdk-core';
    import { IaModuleCardLink } from '@ihreapotheken/ia-sdk-cardlink';
    import { IaModulePharmacy } from '@ihreapotheken/ia-sdk-pharmacy';

    // Register modules before initialization
    await iaSdk.register([
    new IaModuleCardLink(),
    new IaModulePharmacy(),
    ]);

    // Initialize the SDK
    await iaSdk.initialize({
    accessKey: 'your-access-key',
    clientId: 'your-client-id',
    serverEnvironment: ServerEnvironment.Staging,
    });

    Each module must be registered before calling initialize(). The registration and initialization should only be invoked once during the application runtime.

    After initialization, use the SDK methods:

    import { iaSdk, Salutation, IaBaseModule } from '@ihreapotheken/ia-sdk-core';
    import type { IaPharmacyModule } from '@ihreapotheken/ia-sdk-interface';

    // Core methods (always available after initialization)
    await iaSdk.startDashboardActivity();
    await iaSdk.logout();
    await iaSdk.finishAllActivities();

    // Set guest user data for checkout
    await iaSdk.setGuestUserData({
    salutation: Salutation.Mr,
    firstName: 'John',
    lastName: 'Doe',
    email: 'john.doe@example.com',
    phoneNumberCountryCode: 49,
    phoneNumberWithoutCountryCode: '1234567890',
    });

    // Access registered modules
    if (iaSdk.hasModule(IaBaseModule.Pharmacy)) {
    const pharmacy = iaSdk.getModule<IaPharmacyModule>(IaBaseModule.Pharmacy);
    await pharmacy.launchPharmacyDetails();
    await pharmacy.setPharmacyId('pharmacy-123');
    }

    Package Description Key Methods
    @ihreapotheken/ia-sdk-core Core SDK functionality (required) initialize(), startDashboardActivity(), logout(), setGuestUserData()
    @ihreapotheken/ia-sdk-interface TypeScript interface definitions Type exports only
    @ihreapotheken/ia-sdk-cardlink NFC prescription transfer Available through dashboard
    @ihreapotheken/ia-sdk-pharmacy Pharmacy details and management launchPharmacyDetails(), setPharmacyId()
    @ihreapotheken/ia-sdk-ordering Order management and checkout transferPrescriptions(), clearCart(), launchCartScreen()
    @ihreapotheken/ia-sdk-prescription Prescription management Module registered for UI
    @ihreapotheken/ia-sdk-over-the-counter OTC product browsing launchProductSearchRoute()
    @ihreapotheken/ia-sdk-interface (foundation)

    └─── @ihreapotheken/ia-sdk-core (required)
    ↑ (peer dependency)
    ├─── @ihreapotheken/ia-sdk-cardlink
    ├─── @ihreapotheken/ia-sdk-pharmacy
    ├─── @ihreapotheken/ia-sdk-ordering
    ├─── @ihreapotheken/ia-sdk-over-the-counter
    └─── @ihreapotheken/ia-sdk-prescription

    The example/ directory contains a complete example app demonstrating all modules:

    cd example
    yarn install
    yarn android # or yarn ios

    The test/ directory contains minimal example apps for specific use cases:

    • test/cardlink-demo/ - CardLink module only using published packages

    ├── packages/              # SDK modules
    │ ├── core/ # Core SDK functionality
    │ ├── interface/ # Shared TypeScript interfaces
    │ ├── cardlink/ # NFC prescription transfer
    │ ├── pharmacy/ # Pharmacy details
    │ ├── ordering/ # Order management
    │ ├── over-the-counter/ # OTC products
    │ └── prescription/ # Prescription management
    ├── example/ # Full example app (workspace)
    └── test/ # Minimal example apps
    └── cardlink-demo/ # CardLink only (published packages)

    Example app sizes with CardLink module only:

    Platform Size
    Android APK (all architectures) ~174 MB
    iOS App ~52 MB

    Note: Android APK size is for all architectures. Play Store delivery uses split APKs (~45-50 MB per device).


    Project Description
    IA-SDK-Flutter Flutter plugin implementation
    IA-SDK-Android Native Android SDK
    IA-SDK-iOS Native iOS SDK

    For further information, please see the API reference and Usage and Testing documentation.