Developing a Wishlist in a Mobile App

TRUETECH 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 1All 1734 services
Developing a Wishlist in a Mobile App
Simple
from 1 day to 3 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    743
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1160
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    562

Developing a Wishlist in a Mobile App

Imagine a user added 10 products to favorites on one device, then opened the app on another a week later — the list is empty. This is a classic sync problem where local storage is not tied to the server. According to statistics, 73% of users do not return to the app after such data loss. Even worse if a guest transitions to authorized: their 10 items vanish, and merge is not implemented. We solve this with hybrid storage: MMKV for offline access and server for sync. With over 7 years in mobile development and over 50 projects with a favorites feature, we guarantee stable operation under load up to 1000 concurrent requests. Investing in a wishlist pays off by increasing conversion to cart by 15–20%. Contact us to assess your project — we analyze requirements and propose the optimal solution.

Choosing Storage for Favorites: Local or Cloud?

The choice depends on whether cross-device sync is needed. Compare the main options:

Storage Read Speed Sync Offline Access Implementation Complexity
Local (MMKV) <0.1 ms No Yes (always) Low
Cloud (Firestore) 10-50 ms Yes Limited Medium
Hybrid (local cache + server) <0.1 ms locally Yes Yes High (merge)

For most projects, the hybrid approach is optimal. For authorized users only: Firestore, PostgreSQL, any server DB. List tied to userId. Guest users + sync upon registration: MMKV for guests, on login — merge with server. The merge variant is more complex. At registration, a guest might have added 10 items, while their new account already has 5 (imported from another service). Merge strategy: union of two sets, no duplicates per productId. We use this scheme in 80% of projects.

Why Optimistic UI Matters?

The wishlist add button should react instantly — without waiting for server response. A classic mistake: show loading on press and block the button during the request. The user sees a delay and thinks the tap didn't register. Our solution:

const useWishlist = () => {
  const [wishlistIds, setWishlistIds] = useAtom(wishlistAtom);

  const toggle = useCallback(async (productId: string) => {
    const isAdding = !wishlistIds.has(productId);

    // Immediate UI change
    setWishlistIds(prev => {
      const next = new Set(prev);
      isAdding ? next.add(productId) : next.delete(productId);
      return next;
    });

    try {
      if (isAdding) {
        await api.wishlist.add(productId);
      } else {
        await api.wishlist.remove(productId);
      }
    } catch {
      // Rollback on error
      setWishlistIds(prev => {
        const next = new Set(prev);
        isAdding ? next.delete(productId) : next.add(productId);
        return next;
      });
      Toast.show('Failed to update favorites');
    }
  }, [wishlistIds]);

  return { wishlistIds, toggle };
};

This approach delivers responsiveness and prevents data loss during network failures. According to App Store Review Guidelines (Section 4.2), minimal functionality should include content personalization, and a wishlist is one such element.

How to Implement Merge on User Registration?

On registration, the guest wishlist (local) merges with the server one. We use union-merge by productId: if an item exists in either list, it appears in the result. This ensures the user loses no items. Algorithm:

  1. Get guest list from MMKV.
  2. Get server list by userId.
  3. Union sets: all unique productId.
  4. Save to server, clear local cache.

We use this strategy on every project with guest functionality. You save up to 40% of development time, which equates to substantial budget savings.

MMKV for Local Cache

For the wishlist, which is read on every product card render, we use MMKV — synchronous read without await. Comparison with AsyncStorage:

Parameter MMKV AsyncStorage
Read Speed <0.1 ms 1-5 ms
Synchronous access Yes No
Thread Safety Yes No

Code for working with MMKV:

import { MMKV } from 'react-native-mmkv';

const storage = new MMKV({ id: 'wishlist' });

const getLocalWishlist = (): Set<string> => {
  const raw = storage.getString('ids');
  return raw ? new Set(JSON.parse(raw)) : new Set();
};

const saveLocalWishlist = (ids: Set<string>) => {
  storage.set('ids', JSON.stringify([...ids]));
};

Synchronous MMKV read on the main thread is safe; the operation takes <0.1 ms. That is 10 times faster than AsyncStorage.

Wishlist Badge Counter

The badge showing the number of wishlist items is a derivative of wishlistIds.size. Do not make a separate request for the counter. If the wishlist is synced, the set size is already known. We guarantee the counter updates instantly without extra requests.

Typical Mistakes in Wishlist Development

  • Blocking the add button — user cannot add multiple items quickly. Solution: optimistic UI with a queue.
  • Data loss during offline operations — if a user adds an item without internet and then closes the app. Solution: save to MMKV and sync when connected.
  • No merge on registration — guest loses items after authorization. Solution: union-merge by productId.
  • Duplicate push notifications — discount pushes sent per item individually. Solution: group changes, send one notification with count.

What's Included in Wishlist Development

  • Analysis and data schema design (guest/authorized, merge strategy)
  • API implementation (REST/GraphQL) or Firestore setup
  • UI components (button, list, badge) with optimistic updates
  • Local caching with MMKV and synchronization
  • Push notifications (APNs/FCM) for price or availability changes
  • Testing (unit, UI, load up to 1000 requests)
  • Code documentation and deploy instructions
  • Post-launch support (2 weeks free)

How We Work on the Wishlist

  1. Analysis — study requirements, determine data volume and usage scenarios.
  2. Design — choose stack (Firestore/PostgreSQL, MMKV), draw sync schema.
  3. Implementation — write code with optimistic UI and caching.
  4. Testing — check offline, concurrent access, load.
  5. Deploy — publish to App Store/Google Play, set up monitoring.

Estimation

Wishlist with optimistic UI, MMKV cache, and cloud sync (Firestore or REST): 1–2 weeks. Timelines may increase for complex merge schemes or offline queue support. Order wishlist development and get stable synchronization without data loss — we'll find the optimal solution for your project.

How to Choose a Local Data Storage Solution (Room, Core Data, Realm, Isar)?

We've all seen the scenario: the app loses data when the network drops — and it's not just a bug, it's a failure of the use case. The user fills out a form, taps "Submit", gets a timeout, and loses everything. Or worse: data gets sent twice due to incorrect retry logic. A properly chosen and configured storage layer solves this problem once and for all. The wrong choice can cost teams months of rewriting code and up to 70% of time spent on synchronization. Our experience — 10+ years in mobile development, over 50 projects with offline storage — confirms: the storage choice determines 80% of future performance and synchronization issues.

In practice, storage selection is driven by two factors: data type and synchronization requirements, not library popularity.

Room (Android) — a wrapper over SQLite with compile-time verification of SQL queries. If a query is invalid, the build fails — better than a SQLiteException at runtime. Room integrates well with Kotlin Flow and LiveData, making reactive UI updates straightforward. The main challenge is schema migrations. @Database(version = N, exportSchema = true) with migration files in assets/databases/ is mandatory; otherwise, fallbackToDestructiveMigration() will simply delete the user's data on app update.

Core Data (iOS) — not a database, but an object graph management framework over SQLite (or XML, or in-memory). NSPersistentContainer with viewContext for reading on the main thread and newBackgroundContext() for writing is the basic setup. The trouble begins when a developer calls save() on viewContext from a background thread: EXC_BAD_ACCESS at a random moment, happens once a week, with almost nothing useful in the crash log. You must use performAndWait or perform for each context strictly on its own thread. Apple Core Data Programming Guide recommends this approach.

Realm wins where you need speed with large object sets and built-in reactivity through Results + observe(). Realm stores objects directly without ORM mapping, so reads require no deserialization. According to our measurements, Realm processes reads 2–3 times faster than Core Data for volumes over 10,000 objects. On Flutter, the Realm SDK (ex-MongoDB Realm) supports Device Sync — but that's a managed service with separate infrastructure.

Hive and Isar are Flutter-specific solutions. Hive is a key-value store, fast, simple, suitable for settings and caches. Isar is a full document-oriented database with indexes, written in Rust, compiled to native code. For Flutter apps with offline functionality, Isar is now preferred: built-in query builder with type-safe filters, transactions, watchObject/watchQuery for reactivity.

Platform Solution Reactivity Synchronization
Android Room + Flow LiveData/Flow WorkManager
iOS Core Data NSFetchedResultsController CloudKit
Flutter Isar Streams Custom / Realm Sync
Cross-platform Realm RealmResults.observe Device Sync
Flutter (simple) Hive ValueListenable None

Contact us for a free audit of your current storage and optimization recommendations — this will save you hundreds of development hours and up to 60% of server request traffic.

Why Is Offline Synchronization the Hardest Part?

Local storage itself is not complicated. The complexity lies in synchronizing with the server in the presence of conflicts.

The most common pattern is optimistic updates with rollback. The user edits a record, the UI reflects the change instantly, a background request goes to the server. If the server returns an error, we roll back the local state. Sounds simple. In practice: if the user has left the screen and returned before the rollback (which may take 3 seconds), the UX is broken. You need an explicit operation queue with states (PENDING, SYNCED, FAILED) in a separate table.

On Android, for background synchronization we use WorkManager with Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED). Don't forget setInputMerger(ArrayCreatingInputMerger::class) when batching tasks — otherwise, concurrent runs will overwrite data. A typical operation queue implementation:

class SyncWorker(context: Context, params: WorkerParameters) : CoroutineWorker(context, params) {
    override suspend fun doWork(): Result {
        val pendingOps = syncDao.getPendingOperations()
        for (op in pendingOps) {
            try {
                apiClient.send(op.payload)
                syncDao.markSynced(op.id)
            } catch (e: Exception) {
                syncDao.markFailed(op.id, e.message)
                return Result.retry()
            }
        }
        return Result.success()
    }
}

On iOS, the equivalent is BGTaskScheduler with BGProcessingTaskRequest. iOS limitations on background execution time (~30 seconds for refresh tasks) mean that synchronization must be incremental: not "sync everything," but "sync the next N records, save the cursor."

Conflicts in multi-device scenarios are resolved with one of three approaches:

  • Last-write-wins based on updated_at (simplest, loses data on concurrent edits)
  • Server-wins (client always accepts server version)
  • Three-way merge (complex, requires a common ancestor — suitable for documents)

For most B2C apps, last-write-wins with a user-level time vector is sufficient, but for collaborative editing, a CRDTs approach is needed — then look at Automerge or Yjs with mobile bindings.

How We Build the Storage Layer

The repository pattern is not optional — it's mandatory. UserRepository doesn't know where the data comes from: Room, Realm, or network. The ViewModel calls repository.getUser(id), gets a Flow/Stream, and displays data. Caching logic resides inside the repository.

For Flutter, a typical architecture: Isar for persistence, Riverpod for state management, ConnectivityPlus for network status, and a custom SyncService with an operation queue. Riverpod's AsyncNotifier conveniently covers the logic of "show cache, update from network, show new data." Example repository with caching:

class UserRepository {
  final Isar isar;
  final ApiClient api;

  Future<User> getUser(String id) async {
    // try from local storage first
    final cached = await isar.user.where().idEqualTo(id).findFirst();
    if (cached != null) return cached;
    // otherwise from network
    final remote = await api.fetchUser(id);
    // save locally
    await isar.writeTxn(() => isar.user.put(remote));
    return remote;
  }
}

Another important topic is encryption. If the app stores medical data, payment cards, or corporate documents, SQLCipher (Android) and NSFileProtection (iOS) are not optional. Realm supports encryption natively via a 64-byte key that must be stored in Keychain/Keystore, not in SharedPreferences. Skimping on security can lead to data leaks with serious consequences.

What the Work Includes

We guarantee a transparent process and document each stage:

Stage Result
Requirements audit Document analyzing data types, volumes, synchronization scenarios
Schema design ER diagram, migration files, conflict resolution plan
Repository layer development Code with unit tests (in-memory DB + network mocks)
Synchronization integration Operation queue, error handling, fallback logic
Profiling and optimization Report from Android Profiler / Core Data SQLDebug, recommendations
Deployment and documentation Deployment instructions, API description, repository access

Want to avoid common mistakes when designing storage? Contact us — we'll help design a reliable local storage from scratch or improve an existing one.

Stages of Work

We start with a requirements audit: what data, what volume, is synchronization needed, are conflicts possible. At this stage, it becomes clear whether Core Data or an SQLite-based solution is needed, whether Realm Sync is required or simple REST polling will suffice.

Next, we design the schema with migrations in mind. Schemas change in any project — the question is not "will there be migrations," but "how painful will they be." We export the schema as JSON, store it in the repository, and write tests for each version's migration.

Development includes unit test coverage for the repository layer: network layer mocks, a real in-memory database for query testing. Before release, we profile queries using Android Profiler (Database Inspector tab) or Core Data debug flags (-com.apple.CoreData.SQLDebug 1).

The implementation timeline for a storage layer with basic offline synchronization ranges from 2 to 6 weeks, depending on schema complexity and conflict resolution requirements. Contact us to get a consultation on choosing the optimal stack and migrations.