Skip to content

Remote config not returning values after data transfer to a new iPhone #15021

Open
@mihai-zitec

Description

@mihai-zitec

Description

Hello, I have an app using remote config. Before transferring data to the new iPhone everything worked well.

With the app installed on the old iPhone, I transfer the data to a new iPhone using the initialization process.
On the new iPhone the remote config stops working, I don't get the values even if the fetch succeed.

From my code:

Having this property private let remoteConfig = RemoteConfig.remoteConfig() I call

func fetch() async throws {
do {
let fetchStatus = try await remoteConfig.fetchAndActivate()
print(fetchStatus!.rawValue) // this print is executed and the status is a success status
} catch {
throw error
}
}

and I get a success status.

I also tried replacing the above function with:

func forceFetch() async throws {
do {
let status = try await remoteConfig.fetch(withExpirationDuration: 0)

        if status == .success {
            let success = try await remoteConfig.activate()
            print(success) // this print is executed and the status is a success status
        } else {
            throw FetchError.failed(status)
        }
    } catch {
        throw error
    }
}

and I still get a success status. So far so good but when I call remoteConfig.configValue(forKey: key).dataValue I don't get the value.
This happens only on the new iPhone, on the old one everything still works ok.

Reproducing the issue

The bug was found using the store version of my app but I could reproduce it by running the production target from Xcode (easier to debug):

Setup: we need two iPhones to reproduce this bug.

  1. From Xcode, run the app with production setup on the iPhone 1 (or install it from AppStore)
  2. Erase content and data from phone settings on iPhone 2 (or use a brand new iPhone) and start the transfer process
    A tutorial for transferring data: https://www.youtube.com/watch?v=aawvzH5KIQ8 minute 1:40 - 6:15
  3. Make sure the app appears on iPhone 2 after the transfer is complete. This step is mandatory since we don't want a fresh install.
  4. From Xcode, run the app with production setup on the iPhone 2. (or reload it from AppStore if the AppStore version was used in step 1)
  5. Observe: on iPhone 1 everything still works ok, on iPhone 2 the values can't be accessed even if they are fetched successfully.

Firebase SDK Version

11.11.0

Xcode Version

16.2

Installation Method

Swift Package Manager

Firebase Product(s)

Remote Config

Targeted Platforms

iOS

Relevant Log Output

11.11.0 - [FirebaseRemoteConfig][I-RCN000062] Loading database at path /var/mobile/Containers/Data/Application/560D6E68-6CE5-466B-813E-CD5AD0DEE0CA/Library/Application Support/Google/RemoteConfig/RemoteConfig.sqlite3
11.11.0 - [FirebaseMessaging][I-FCM043000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    acct = "ro.softeh.ReginaMaria";
    class = genp;
    gena = "com.google.iid";
    "m_Limit" = "m_LimitAll";
    nleg = 1;
    "r_Attributes" = 1;
    "r_Data" = 1;
    svce = "com.google.iid.checkin";
}
11.11.0 - [FirebaseMessaging][I-FCM033009] App reset detected but no valid checkin auth preferences found. Will not delete server token registrations.
11.11.0 - [FirebaseMessaging][I-FCM002000] FIRMessaging library version 11.11.0
11.11.0 - [GULReachability][I-REA902003] Monitoring the network status
11.11.0 - [FirebaseMessaging][I-FCM043000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    acct = "ro.softeh.ReginaMaria";
    class = genp;
    gena = "com.google.iid-tokens";
    "m_Limit" = "m_LimitAll";
    nleg = 1;
    "r_Attributes" = 1;
    "r_Data" = 1;
    svce = "778054504443:*";
}
11.11.0 - [FirebaseMessaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
11.11.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001008] Successfully created App Delegate Proxy automatically. To disable the proxy, set the flag GoogleUtilitiesAppDelegateProxyEnabled to NO (Boolean) in the Info.plist
<Warning>: isAdvertiserTrackingEnabled setter has been deprecated and the value will be read from ATT status.
---- LOGGING STARTED -----
App Version: 4.0.24 (55)
11.11.0 - [FirebaseRemoteConfig][I-RCN000067] Successfully set configSettings. Minimum Fetch Interval:0.000000, Fetch timeout:60.000000
11.11.0 - [GoogleUtilities/SceneDelegateSwizzler][I-SWZ001114] Successfully created Scene Delegate Proxy automatically. To disable the proxy, set the flag GoogleUtilitiesAppDelegateProxyEnabled to NO (Boolean) in the Info.plist
11.11.0 - [GULReachability][I-REA902004] Network status has changed. Code:2, status:Connected
11.11.0 - [GULReachability][I-REA902004] Network status has changed. Code:2, status:Connected
11.11.0 - [GULReachability][I-REA902004] Network status has changed. Code:2, status:Connected
<Warning>: The value for FacebookAdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results.
11.11.0 - [FirebaseFirestore][I-FST000001] Initializing. Current user:
11.11.0 - [FirebaseFirestore][I-FST000001] Using /var/mobile/Containers/Data/Application/560D6E68-6CE5-466B-813E-CD5AD0DEE0CA/Library/Application Support/firestore/__FIRAPP_DEFAULT/mobile-app-push-13f4f/main for LevelDB storage
11.11.0 - [FirebaseAnalytics][I-ACS023049] Analytics is disabled. Event not logged
11.11.0 - [FirebaseAnalytics][I-ACS031029] Logging screen view with screen name and screen class: SplashScreen, SplashViewController
11.11.0 - [FirebaseAnalytics][I-ACS023049] Analytics is disabled. Event not logged
11.11.0 - [FirebaseAnalytics][I-ACS023049] Analytics is disabled. Event not logged
11.11.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Start LevelDB: 0 changes (0 bytes):>
11.11.0 - [FirebaseCrashlytics][I-CLS000000] Settings downloaded successfully
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Start MutationQueue: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Start IndexManager: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction migrate overlays: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction NextMutationBatchAfterBatchID: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Allocate target: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] Using full collection scan to execute query: Query(canonical_id=analytics_friendly_screen_names_v2/mapping_ios|f:|ob:__name__asc)
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction ExecuteQuery: 0 changes (0 bytes):>
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) start
11.11.0 - [FirebaseAuth][I-AUT000002] Token auto-refresh enabled.
11.11.0 - [FirebaseFirestore][I-FST000001] Creating Firestore stub.
11.11.0 - [FirebaseSessions][I-SES000000] Data Collection is enabled for at least one Subscriber
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) watch: <ListenRequest 0x16f3b65d0>: {
  database: "projects/mobile-app-push-13f4f/databases/(default)"
  add_target {
    documents {
      documents: "projects/mobile-app-push-13f4f/databases/(default)/documents/analytics_friendly_screen_names_v2/mapping_ios"
    }
    target_id: 2
  }
}
11.11.0 - [FirebaseSessions][I-SES000000] [Settings] Cache TTL expired
11.11.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseSessions][I-SES000000] Successfully logged Session Start event to GoogleDataTransport
11.11.0 - [FirebaseSessions][I-SES000000] Successfully logged Session Start event
Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 97 named com.apple.commcenter.coretelephony.xpc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service with pid 97 named com.apple.commcenter.coretelephony.xpc was invalidated from this process.}
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) headers (allowlisted): date: Mon, 23 Jun 2025 07:35:19 GMT
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) response: <ListenResponse 0x16f8a2660>: {
  target_change {
    target_change_type: ADD
    target_ids: 2
  }
}
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) headers (allowlisted): date: Mon, 23 Jun 2025 07:35:19 GMT
11.11.0 - [FirebaseFirestore][I-FST000001] WatchStream (313162353165333138) response: <ListenResponse 0x16f3b6660>: {
  target_change {
    target_change_type: REMOVE
    target_ids: 2
    cause {
      code: 7
      message: "Missing or insufficient permissions."
    }
  }
}
11.11.0 - [FirebaseFirestore][I-FST000001] Committing transaction: <LevelDbTransaction Release target: 2 changes (121 bytes):
  - Put [target: target_id=2] (115 bytes)
  - Put [target_global:] (6 bytes)>
11.11.0 - [FirebaseFirestore][I-FST000001] Listen for query at analytics_friendly_screen_names_v2/mapping_ios failed: Missing or insufficient permissions.
11.11.0 - [FirebaseRemoteConfig][I-RCN000039] Starting requesting token.
11.11.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseInstallations][I-FIS002001] -[FIRInstallationsIDController installationWithValidAuthTokenForcingRefresh:0], appName: __FIRAPP_DEFAULT
11.11.0 - [FirebaseRemoteConfig][I-RCN000022] Success to get iid : etiwbRsY00RPg8G5YHhw29.
11.11.0 - [FirebaseRemoteConfig][I-RCN000060] Fetch with user properties completed.
11.11.0 - [FirebaseRemoteConfig][I-RCN000061] Fetch with user properties initiated.
11.11.0 - [FirebaseRemoteConfig][I-RCN000040] Start config fetch.
11.11.0 - [FirebaseRemoteConfig][I-RCN000061] Making remote config fetch.
11.11.0 - [FirebaseRemoteConfig][I-RCN000046] Making config request: https://firebaseremoteconfig.googleapis.com/v1/projects/mobile-app-push-13f4f/namespaces/firebase:fetch?key=AIzaSyBY_-r0pKPjHo1x4jCVtojVYayaP7k3Qb8
11.11.0 - [FirebaseRemoteConfig][I-RCN000050] config fetch completed. Error: nil StatusCode: 200
11.11.0 - [FirebaseRemoteConfig][I-RCN000059] Updating config content from Response for namespace:firebase:__FIRAPP_DEFAULT with state: NO_CHANGE
11.11.0 - [FirebaseRemoteConfig][I-RCN000056] Updating metadata with fetch result.
11.11.0 - [FirebaseRemoteConfig][I-RCN000069] Most recently fetched config is already activated.

11.11.0 - [FirebaseAnalytics][I-ACS002001] APMExperimentAlarm fired
11.11.0 - [FirebaseAnalytics][I-ACS002003] APMExperimentAlarm canceled
11.11.0 - [FirebaseAnalytics][I-ACS002002] APMExperimentAlarm scheduled to fire in approx. (s): 14399.99815702438

If using Swift Package Manager, the project's Package.resolved

{
"originHash" : "9d47b2425d2fae3fff0a1ff804a751a059dd3f08844295b0df8eaaeb56e18a8d",
"pins" : [
{
"identity" : "abseil-cpp-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/abseil-cpp-binary.git",
"state" : {
"revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5",
"version" : "1.2024072200.0"
}
},
{
"identity" : "app-check",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/app-check.git",
"state" : {
"revision" : "61b85103a1aeed8218f17c794687781505fbbef5",
"version" : "11.2.0"
}
},
{
"identity" : "cocoalumberjack",
"kind" : "remoteSourceControl",
"location" : "https://github.com/CocoaLumberjack/CocoaLumberjack.git",
"state" : {
"revision" : "4b8714a7fb84d42393314ce897127b3939885ec3",
"version" : "3.8.5"
}
},
{
"identity" : "facebook-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/facebook/facebook-ios-sdk",
"state" : {
"revision" : "b28dde427715b45a26ebebf697929f4a81b15e04",
"version" : "18.0.0"
}
},
{
"identity" : "fastis",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simla-tech/Fastis.git",
"state" : {
"revision" : "1f33807dea8152665415e2ecc78b432eedf59ba6",
"version" : "3.2.0"
}
},
{
"identity" : "fingerprintjs-pro-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/fingerprintjs/fingerprintjs-pro-ios",
"state" : {
"revision" : "382d45b4f1fa8008ced0ac59675af0420e20e255",
"version" : "2.8.2"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/firebase-ios-sdk.git",
"state" : {
"revision" : "d1f7c7e8eaa74d7e44467184dc5f592268247d33",
"version" : "11.11.0"
}
},
{
"identity" : "googleappmeasurement",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleAppMeasurement.git",
"state" : {
"revision" : "dd89fc79a77183830742a16866d87e4e54785734",
"version" : "11.11.0"
}
},
{
"identity" : "googledatatransport",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleDataTransport.git",
"state" : {
"revision" : "617af071af9aa1d6a091d59a202910ac482128f9",
"version" : "10.1.0"
}
},
{
"identity" : "googleutilities",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/GoogleUtilities.git",
"state" : {
"revision" : "53156c7ec267db846e6b64c9f4c4e31ba4cf75eb",
"version" : "8.0.2"
}
},
{
"identity" : "grpc-binary",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/grpc-binary.git",
"state" : {
"revision" : "cc0001a0cf963aa40501d9c2b181e7fc9fd8ec71",
"version" : "1.69.0"
}
},
{
"identity" : "gtm-session-fetcher",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/gtm-session-fetcher.git",
"state" : {
"revision" : "4d70340d55d7d07cc2fdf8e8125c4c126c1d5f35",
"version" : "4.4.0"
}
},
{
"identity" : "interop-ios-for-google-sdks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/interop-ios-for-google-sdks.git",
"state" : {
"revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe",
"version" : "101.0.0"
}
},
{
"identity" : "ios-branch-sdk-spm",
"kind" : "remoteSourceControl",
"location" : "https://github.com/BranchMetrics/ios-branch-sdk-spm",
"state" : {
"revision" : "e3b2b380f483ab16e072ad329c6e2c019a2e88c5",
"version" : "3.10.0"
}
},
{
"identity" : "iossecuritysuite",
"kind" : "remoteSourceControl",
"location" : "https://github.com/securing/IOSSecuritySuite.git",
"state" : {
"revision" : "eafc3f1aec25606ca99dd73c5a77a153c99903f9",
"version" : "2.1.0"
}
},
{
"identity" : "jtapplecalendar",
"kind" : "remoteSourceControl",
"location" : "https://github.com/patchthecode/JTAppleCalendar",
"state" : {
"revision" : "718f0ab68ba0fcd2bc134f6e9d30edc1b9b038e1",
"version" : "8.0.5"
}
},
{
"identity" : "lettercase",
"kind" : "remoteSourceControl",
"location" : "https://github.com/rwbutler/LetterCase",
"state" : {
"revision" : "03589da8c6554655b276ba187cfc1cd35ad711d2",
"version" : "1.6.1"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/leveldb.git",
"state" : {
"revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
"version" : "1.22.5"
}
},
{
"identity" : "lottie-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/airbnb/lottie-ios.git",
"state" : {
"revision" : "fe4c6fe3a0aa66cdeb51d549623c82ca9704b9a5",
"version" : "4.5.0"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
"location" : "https://github.com/firebase/nanopb.git",
"state" : {
"revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
"version" : "2.30910.0"
}
},
{
"identity" : "nuke",
"kind" : "remoteSourceControl",
"location" : "https://github.com/kean/Nuke",
"state" : {
"revision" : "0ead44350d2737db384908569c012fe67c421e4d",
"version" : "12.8.0"
}
},
{
"identity" : "otpublishersheadlesssdk",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Zentrust/OTPublishersHeadlessSDK",
"state" : {
"revision" : "f064b1925dc6c3cddbd4260f8538814d91e86028",
"version" : "202211.1.0"
}
},
{
"identity" : "prettycards",
"kind" : "remoteSourceControl",
"location" : "https://github.com/simla-tech/PrettyCards",
"state" : {
"revision" : "3115edbd79c66090729dfb261dc4fbf7c6df0ac1",
"version" : "1.0.7"
}
},
{
"identity" : "promises",
"kind" : "remoteSourceControl",
"location" : "https://github.com/google/promises.git",
"state" : {
"revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
"version" : "2.4.0"
}
},
{
"identity" : "rxswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ReactiveX/RxSwift",
"state" : {
"revision" : "b06a8c8596e4c3e8e7788e08e720e3248563ce6a",
"version" : "6.7.1"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections.git",
"state" : {
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06",
"version" : "1.1.3"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log",
"state" : {
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "d72aed98f8253ec1aa9ea1141e28150f408cf17f",
"version" : "1.29.0"
}
},
{
"identity" : "swiftuicharts",
"kind" : "remoteSourceControl",
"location" : "https://github.com/willdale/SwiftUICharts",
"state" : {
"revision" : "53a3a2f16730af6709283f83a9dc75a3dde252ff",
"version" : "2.10.2"
}
},
{
"identity" : "swiftuiflow",
"kind" : "remoteSourceControl",
"location" : "https://github.com/ciaranrobrien/SwiftUIFlow",
"state" : {
"branch" : "main",
"revision" : "b300d3c0110116f3520066dfb8dcf3006cf593c3"
}
}
],
"version" : 3
}

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions