# Fix Lokalise OTA SDK serving a stale bundle version

## TL;DR

The SDK caches the bundle aggressively, so bump the version and make sure the SDK actually checks for updates. Confirm the new bundle is published in the Lokalise dashboard, then check the SDK init params for the update interval. Stale bundles almost always mean the app never asked for a new one.

## The error

```text
OTA SDK still serves bundle v12 after v13 published
new strings from v13 do not appear in the app
```

## Fix it

### Step 1: Confirm v13 is published in the dashboard

```bash
node -e "console.log('Lokalise dashboard, OTA: check the latest published bundle version and timestamp')"
```

Expected: v13 shows as published after your string changes.

### Step 2: Check the SDK update settings in the app

```bash
grep -rn "ota\|update" src/i18n/lokalise.js | head -8
```

Expected: You see the bundle version pin and the update interval.

### Step 3: Force a bundle refresh on next launch

```bash
node -e "console.log('call the SDK update method at startup, or clear the cached bundle to force a refetch')"
```

Expected: The app fetches v13 on the next start.

### Step 4: Verify the new strings render

```bash
node -e "console.log('open the screen with the new strings, confirm v13 copy shows')"
```

Expected: The new strings appear.

## When to use this

- Lokalise OTA SDK serves an old bundle after publishing
- New strings do not reach the app

## When NOT to use this

- The bundle updates but strings are wrong, check the translations
- No bundle downloads at all, check network and the SDK key

## Tool and version compatibility

- Lokalise OTA SDKs (iOS, Android, JS)
- Over-the-air bundle publishing

## Variant phrasings

### stale only on some devices

Those devices have not checked for updates yet. The update interval or manual refresh controls this.

### version bumps but content is old

The publish ran before the translations were done. Republish after the translations land.

## Why it happens

OTA delivery is pull-based with local caching. The SDK keeps the last bundle it downloaded until its update check runs, so a publish alone changes nothing on device until the app asks again.

## Edge cases

- Airplane-mode devices keep the stale bundle indefinitely, design for that
- Bundle diffs are small but the first download is full, test on slow networks
- Pinning a bundle version in code overrides OTA, remove the pin to go floating

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_UsrPud_k3QnZZa5qRYsGpg
