firebase / firebase/firebase-ios-sdk
Remote Config returns empty data after device restore if app was opened once before upgrading to SDK ≥ 12.6.0 (Old bug)
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
## Description
This issue appears to be a remaining case related to previously reported issues #14459 and #4677.
After restoring an iPhone from backup (iCloud or device-to-device), Firebase Remote Config may permanently return empty config data, even after upgrading to a Firebase SDK version that includes the fix released in 12.6.0.
### Background
Firebase Remote Config 12.6.0 introduced a fix for a race condition that could lead to empty Remote Config data after a device restore:
https://firebase.google.com/support/release-notes/ios#version_1260_-_november_13_2025
However, the fix only applies if the app is **first** opened after upgrading to SDK 12.6.0+.
Opening the app once after restore with an SDK < 12.6.0 creates an empty Remote Config database without resetting user defaults. After upgrading, the SDK detects the database as valid and skips the reset logic, leaving Remote Config stuck in an empty state.
## Reproducing the issue
1. App is installed with Firebase SDK < 12.6.0
2. iPhone is restored from backup (iCloud or device-to-device)
3. User opens the app at least once
4. At this point:
- `RemoteConfig.sqlite3` does not exist
- The old SDK creates an empty Remote Config database
- Due to the known race condition #15442, Remote Config UserDefaults are NOT reset
5. App is later updated to Firebase SDK 12.6.0+
6. On launch:
- The SDK finds an existing RemoteConfig.sqlite3
- User defaults are not reset
- Remote Config fetch continues to return empty data indefinitely
### Result
- Remote Config returns empty values
- Fetch calls succeed but provide no parameters
- The state persists across:
- App restarts
- SDK upgrades
- Successful fetches
The only way to recover is to:
- Perform another full device restore for the fix to take place
- Uninstall and re-install the app
### Expected Behavior
Upgrading to Firebase SDK 12.6.0+ should recover Remote Config correctly, even if the app was opened once after restoring using an older SDK
At minimum, the SDK should detect and recover from this invalid state (empty DB + stale user defaults).
## Firebase SDK Version
12.8.0
## Xcode Version
26.0.1
## Installation Method
Swift Package Manager
## Firebase Product(s)
Remote Config
## Targeted Platforms
iOS
## Relevant Log Output
```shell
{
"state": "NO_CHANGE",
"templateVersion": "35"
}
```
## If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
```json
{
"originHash" : "0f5f10860512d397308b5095ec6befb71ad2fb84c36c7607cd386106caa56e00",
"pins" : [
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk",
"state" : {
"revision" : "674d9a7ee9858207181a3dd0b42c77298c6fb71b",
"version" : "12.8.0"
}
}
],
"version" : 3
}
```
## If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
```yml
Replace this line with the contents of your Podfile.lock!
```
Contributor guide
Assessment
This issue has not been assessed yet.