User settings migration between mobile app versions

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
User settings migration between mobile app versions
Simple
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing User Settings Migration Between Mobile App Versions

User updates the app — and all settings reset to defaults. Dark theme became light, notifications turned back on, chosen language switched to system. This happens when in new version they renamed keys in SharedPreferences / UserDefaults or changed stored value type. Without explicit migration, old values are simply ignored.

UserDefaults / SharedPreferences Migration Strategy

Basic principle — version storage settings like versioning database.

// Android
class SettingsMigration(private val prefs: SharedPreferences) {
    private val PREFS_VERSION_KEY = "prefs_version"

    fun migrate() {
        val currentVersion = prefs.getInt(PREFS_VERSION_KEY, 0)
        if (currentVersion < 1) migrateV0toV1()
        if (currentVersion < 2) migrateV1toV2()
        prefs.edit().putInt(PREFS_VERSION_KEY, CURRENT_VERSION).apply()
    }

    private fun migrateV0toV1() {
        // Key rename: "dark_mode" (boolean) → "theme" (string)
        val wasDark = prefs.getBoolean("dark_mode", false)
        prefs.edit()
            .putString("theme", if (wasDark) "dark" else "light")
            .remove("dark_mode")
            .apply()
    }
}

Called on first launch of new version — before UI initialization.

// iOS
class SettingsMigrator {
    private let defaults = UserDefaults.standard
    private let versionKey = "settingsVersion"

    func migrate() {
        let version = defaults.integer(forKey: versionKey)
        if version < 1 { migrateToV1() }
        if version < 2 { migrateToV2() }
        defaults.set(2, forKey: versionKey)
    }

    private func migrateToV1() {
        // Bool → String enum
        let wasDark = defaults.bool(forKey: "darkMode")
        defaults.set(wasDark ? "dark" : "light", forKey: "theme")
        defaults.removeObject(forKey: "darkMode")
    }
}

Work Scope

  • Audit current SharedPreferences / UserDefaults keys
  • Version storage settings
  • Migrators for renames and type changes
  • Run migration at app startup before UI initialization

Timeline

Settings migration for 1–2 versions: 0.5 day. Full audit and migration chain for several versions: 1 day.