# sohelislamimran/expo-in-app-updates architecture

> Architecture diagram of the GitHub repository sohelislamimran/expo-in-app-updates, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sohelislamimran/expo-in-app-updates
- Repository: https://github.com/sohelislamimran/expo-in-app-updates

## Overview

expo-in-app-updates exposes a JavaScript API for checking store versions and starting native update flows. The main workflow is a JS caller invoking checkForUpdate or checkAndStartUpdate, then dispatching to the platform module: Android uses Play Core for availability, flexible/immediate flows, install events, and store fallback; iOS looks up the App Store listing and presents its product sheet or opens the App Store app. Web reports no updates. Relationships are shown only where supported by excerpts or README; native service details are documented but not independently sampled beyond the provided source excerpts.

Main entry points: [`src/index.ts`](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/index.ts) (Public API), [`ios/ExpoInAppUpdatesModule.swift`](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/ios/ExpoInAppUpdatesModule.swift) (iOS module), [`src/ExpoInAppUpdatesModule.ts`](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdatesModule.ts) (Native bridge), [`android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt`](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt) (Android module)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_js_api["JavaScript API"]
  node_public_api["Public API<br/>[index.ts]"]
  node_api_types["Update types"]
  node_native_bridge["Native bridge"]
end

subgraph group_android_runtime["Android updates"]
  node_android_module["Android module"]
  node_play_core["Google Play"]
  node_play_store["Play Store fallback"]
end

subgraph group_ios_runtime["iOS updates"]
  node_ios_module["iOS module"]
  node_lookup["App Store lookup"]
  node_itunes["iTunes Search API"]
  node_storekit["StoreKit product sheet"]
  node_app_store["App Store app"]
end

subgraph group_web_runtime["Web fallback"]
  node_web_module["Web module"]
end

node_app(("Application caller"))

node_app -->|"calls"| node_public_api
node_public_api -->|"delegates"| node_native_bridge
node_public_api -->|"exposes types"| node_api_types
node_native_bridge -.->|"dispatches"| node_android_module
node_native_bridge -.->|"dispatches"| node_ios_module
node_public_api -.->|"uses on web"| node_web_module
node_android_module -->|"queries and starts"| node_play_core
node_android_module -->|"redirects on failure"| node_play_store
node_ios_module -->|"fetches listing"| node_lookup
node_lookup -->|"looks up listing"| node_itunes
node_ios_module -->|"presents product"| node_storekit
node_ios_module -->|"opens fallback"| node_app_store

click node_public_api "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/index.ts"
click node_api_types "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdates.types.ts"
click node_native_bridge "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdatesModule.ts"
click node_android_module "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt"
click node_ios_module "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/ios/ExpoInAppUpdatesModule.swift"
click node_lookup "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/ios/AppStoreLookup.swift"
click node_web_module "https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdatesModule.web.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_public_api,node_api_types,node_native_bridge toneBlue
class node_android_module,node_play_core,node_play_store toneAmber
class node_ios_module,node_lookup,node_itunes,node_storekit,node_app_store toneMint
class node_web_module toneRose
class node_app toneIndigo
```

## Components

### JavaScript API

- [Public API](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/index.ts): `src/index.ts`
- [Update types](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdates.types.ts): `src/ExpoInAppUpdates.types.ts`
- [Native bridge](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdatesModule.ts): `src/ExpoInAppUpdatesModule.ts`

### Android updates

- [Android module](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt): `android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt`
- **Google Play**
- **Play Store fallback**

### iOS updates

- [iOS module](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/ios/ExpoInAppUpdatesModule.swift): `ios/ExpoInAppUpdatesModule.swift`
- [App Store lookup](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/ios/AppStoreLookup.swift): `ios/AppStoreLookup.swift`
- **iTunes Search API**
- **StoreKit product sheet**
- **App Store app**

### Web fallback

- [Web module](https://github.com/sohelislamimran/expo-in-app-updates/blob/main/src/ExpoInAppUpdatesModule.web.ts): `src/ExpoInAppUpdatesModule.web.ts`

### Other components

- **Application caller**

## Connections

- Application caller → Public API: calls (evidence: `README.md`)
- Public API → Native bridge: delegates (evidence: `src/index.ts`)
- Public API → Update types: exposes types (evidence: `src/index.ts`)
- Native bridge → Android module: dispatches
- Native bridge → iOS module: dispatches
- Public API → Web module: uses on web
- Android module → Google Play: queries and starts (evidence: `android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt`)
- Android module → Play Store fallback: redirects on failure (evidence: `android/src/main/java/expo/modules/inappupdates/ExpoInAppUpdatesModule.kt`)
- iOS module → App Store lookup: fetches listing (evidence: `ios/ExpoInAppUpdatesModule.swift`)
- App Store lookup → iTunes Search API: looks up listing (evidence: `ios/AppStoreLookup.swift`)
- iOS module → StoreKit product sheet: presents product (evidence: `ios/ExpoInAppUpdatesModule.swift`)
- iOS module → App Store app: opens fallback (evidence: `ios/ExpoInAppUpdatesModule.swift`)
