DEV Community

Cover image for Mobile development best practices
Francesco Mariani for Claranet

Posted on • Originally published at claranet.com

Mobile development best practices

Introduction

Today, mobile applications are at the forefront of user engagement, brand presence, and business growth. With the spread of multiple platforms, it’s essential to develop robust, scalable, and user-friendly mobile apps. This requires more than just coding skills, and it demands a solid grasp of best practices and deep platform knowledge to ensure long-term success and maintainability.

This article explores essential best practices in mobile development for building UIs aligned with iOS and Android platform guidelines, preserving usability, and managing upgrades to safeguard backward compatibility.

Next, we examine the critical roles of automated testing and CI/CD.

Finally, we’ll look at strategies for efficient data handling

Usability

When developing a project for iOS and Android, it is essential to adhere to the usability guidelines specific to each platform to ensure a consistent, intuitive, and accessible user experience.

You can refer to the official guidelines provided by Apple and Android

Now, we look at some of the usability rules, first with iOS and then Android:

IOS

Depth, clarity, and deference (subtle and unobtrusive interface design).

The app uses subtle shadows, blurs, and transitions to show hierarchy between components.

ISO

Top navigation bar with cantered titles

Centering titles in the top navigation bar reinforces platform consistency, offers immediate screen context, and contributes to a balanced, intuitive layout that aligns with iOS user expectations.

ISO

Bottom tab bar for primary sections

A bottom tab bar is essential for organizing an app’s main sections. It gives users immediate, consistent access to the app’s core areas, improving discoverability and reducing navigation steps. This aligns with iOS design principles by prioritizing simplicity and directness for frequent tasks.

ISO

Back gesture: swipe from left to right.

The swipe-from-left-edge back gesture makes navigation more fluid and natural, letting users move backward with a quick, intuitive swipe. It reduces reliance on tap targets, speeds up interaction, and aligns with iOS’s focus on gesture-driven, edge-to-edge experiences.

ISO

Minimalism: Apple promotes a clean and restrained design.

Apple consistently advocates for minimalistic design principles, emphasizing clarity, focus, and simplicity. Their interfaces use generous white space, subtle color palettes, and intuitive layouts that prioritize essential content, reducing cognitive load. This approach not only enhances aesthetics but also improves usability by guiding users naturally through tasks without unnecessary distractions.

ISO

Native components: UISwitch, UITableView, UICollectionView, etc.

Apple’s native UI components, such as UISwitch, UITableView, and UICollectionView, are fundamental building blocks of iOS applications. These standardized elements provide consistent behavior, accessibility, and visual style across apps. With the use of native controls, developers ensure seamless integration with system conventions, improve performance, and deliver a familiar experience that aligns with Apple’s Human Interface Guidelines.

ISO

Dark Mode: supporting is highly recommended

Dark Mode has become a standard expectation in modern mobile applications as it provides users with an alternative appearance that reduces eye strain and saves battery life on OLED screens. With system-driven dark appearances, developers ensure consistent theming, seamless transitions between light and dark modes, and adherence to user preferences. Supporting Dark Mode not only enhances accessibility and comfort but also aligns with platform guidelines, improving the overall quality and professionalism of the app.

ISO

Android

Material You: dynamic theming based on the user’s system theme and preferences.

Material You is a personalized design system that adapts its appearance based on the user's preferences and current system theme. It dynamically changes color schemes, typography, and other user interface elements to create a cohesive and customizable experience that feels unique to each user. This approach enhances the aesthetic appeal of an app and boosts usability and accessibility, making interactions more intuitive based on user's habitual patterns and preferences.

Floating Action Button (FAB) for primary actions.

The Floating Action Button (FAB) is a hallmark of Material Design, designed to promote a primary action within an app, such as composing a new message, adding a new contact, or creating a new document. Its distinguished circular shape and elevated position over the interface command user attention, making it easily accessible while not interfering with other UI elements. FAB supports a better user experience by providing a consistent and recognizable action button.

Navigation Drawer or Bottom Navigation for main navigation structures.

Navigation drawers and bottom navigation bars are critical components in structuring and accessing major areas of an app efficiently. The navigation drawer slides out from the side and is ideal for accessing a wide range of options without cluttering the primary interface. In contrast, bottom navigation bars provide visible at-a-glance views for top-level destinations. Both elements facilitate seamless navigation across the app's different sections, enhancing usability with clear, reachable pathways.

ISO

Physical or gesture-based back button: pressing the back button with a modal or overlay open should dismiss the modal, not navigate back to the previous screen.

Proper utilization of the back button ensures an intuitive navigation. Whether it's a physical button or a gesture-based control, pressing the back button should first close any active modals or overlays. This makes sure that the user doesn't unintentionally exit the current context or lose unsaved changes, thus maintaining a logical progression through app content and preventing potential frustration from unexpected navigation actions.

Standard Material components: Button, Card, Chip, Snackbar, etc.

Standard Material components such as Buttons, Cards, Chips, and Snackbars play key roles in creating a consistent and functional user interface. Each component serves distinct purposes: Buttons are for actions; Cards for grouping related information in a flexible container; Chips for compact elements representing input, attribute, or action; and Snackbars for brief messages about app processes. These components are designed for versatility and scalability across different platforms and provide a unified design language and interaction consistency.

Anroid

Anroid

Meaningful animations: transitions, elevation effects, and interaction feedback.

Meaningful animations enhance user experience by providing visual cues that depict relationships, hierarchy, and functionality. Smooth transitions guide users between app states with clear movement that respects context, improving cognitive recognition of app structure. Elevation effects create depth and focus attention, while interaction feedback animations reassure users of their actions, such as button presses or toggling settings, establishing a satisfying interaction that confirms user inputs have been recognized and processed.

There are also common best practices shared by iOS and Android that are useful in the daily use:

  • Design & test: use tools like Figma, Sketch, Adobe XD, and conduct testing with real users.
  • Respect platform differences: avoid forcing the behaviour of one platform onto the other.
  • Continuous update: stay aligned with the evolving Apple/Google guidelines and plan for continuous delivery, potentially leveraging a release pipeline.

WCAG Compliance Check

To verify whether an app is compliant with the WCAG, you can refer to the following specifically tailored for mobile accessibility:

https://www.w3.org/WAI/standards-guidelines/mobile/

After reviewing the WCAG guidelines, you need to check if your app complies with them. In the next chapter, we’ll look at some testing tools to help you do that.

Accessibility test tools

Both Android and iOS offer various frameworks for unit, UI, and integration testing, but finding the right tools to test accessibility can be more challenging.

Let’s describe some of them:

IOS

  • Xcode Accessibility Inspector: Xcode tool for display, query, and test accessibility information for the elements in your app’s view hierarchy.
  • VoiceOver: Built-in screen reader for Apple devices that enables users to interact with their devices using spoken and tactile feedback instead of visual cues.
  • ContrastKit: Is a Swift library design to facilitate colour contrast handling within iOS, IPadOS, macOS and tvOS applications.
  • Colour Contrast Calculator: Xcode’s tool to compute contrast between any two colours and use those colours for images used between normal and high-contrast mode. To open it, you can go to: ‘Open Developer tools > Accessibility Inspector > Window > Show Contrast Calculator.

Android

  • Accessibility Scanner (Google): You can download it from the Play store. The scanner records the current screen and provides you tips to improve accessibility of your app based on the following elements: labels, touch target size, clickable elements, text and image contrast.
  • TalkBack: this is a screen reader for Android devices, developed by Google, that provides spoken and braille feedback to help users with visual impairments interact with their devices.
  • Layout Inspector (included in Android Studio): this Android studio tools lets you debug the app layout by showing a view hierarchy where you can inspect the properties of each view.
  • Android Accessibility Test Framework (ATF) with Espresso: it works with Espresso, a popular testing framework, and automatically looks for common accessibility issues like missing labels or low contrast during UI tests.

Data management and synchronization

After discussing the UI, let’s look at how to handle the data in the following possible scenarios.

Handling small amounts of data

In this case the structure is primarily key value based, Android’s SharedPreferences and iOS’s UserDefaults are typically used.

To synchronize this information online -to enable the user to access the same app data across multiple devices or after reinstalling the app- we can find various online services, such as:

  • Firebase Remote Config: ideal for feature flags and configuration settings.
  • iCloud Key-Value Store: iOS-only, perfect for user settings, preferences, and app state, with a 1MB maximum limit.
  • Firebase Realtime Database or Firestore: enables real-time automatic synchronization, commonly used for shared data across devices, configurations, app state, and user preferences.

We can summarize using the following table:

Level Tool Scope
Local SharedPreferences / UserDefaults Cache and offline access
Synchronization Firestore / REST API Backup and synchronization between devices
Sensitive data Keychain / Secure Storage Token, password
Dynamic configurations Firebase Remote Config / ICloud Key-Value Feature toggle, A/B testing

Management and synchronization of large amounts of data

In this case, you will most likely manage a Room database for Android, Core Data for iOS, SQLite for Flutter, and WatermelonDB for React Native.

Stack Local DB Recommended Sync
Android Room / SQLite WorkManager + Retrofit / Firestore SDK
iOS CoreData CloudKit / API REST
Flutter sqflite Cloud Firestore / REST
React Native WatermelonDB Custom sync / Firebase

Below are some best practices for database management:

  • Change tracking: use fields such as lastModified, syncStatus, version.
  • Migration: create a migration for every app version upgrade and write automated tests to validate the migration.
  • Conflict management: use strategies like "Last Write Wins," logical merge, or centralized control.
  • Flexibility: keep the data model independent from the database (DTO ↔ Entity).
  • Network: detect network status before attempting sync; provide offline fallback.
  • Security: authentication (JWT, OAuth2), mandatory HTTPS, secure token management.
  • Intelligent sync: trigger sync on events (e.g., login, data changes), timers, or network conditions.
  • Backup & Restore: offer manual/automatic backups to cloud services or exportable files.

Update Management & Backward Compatibility

To ensure API stability across different app versions, it is essential to follow the following best practices:

API Versioning and Management

  • Use API versioning (e.g., /api/v1/): for each major release, it is recommended to maintain a dedicated API version.
  • Maintain backward compatibility: avoid breaking changes while previous app versions are still in use.
  • Gradually deprecate obsolete APIs that are no longer used.
  • Server-side feature flags: enable or disable features on the server side to prevent crashes in outdated app versions.
  • Check the client version in the API: send the app version in the request headers and tailor the response accordingly.

Environment management and testing

  • Separate environments for dev/staging/prod (including for APIs).
  • Mock APIs to test new features without affecting real data.
  • Automated and manual testing across multiple API and app versions.
  • Unit tests, UI tests (Espresso, XCTest), and integration tests.
  • Backward compatibility testing: test the new app against old APIs and vice versa, and handle exceptions accordingly.

Progressive rollout and rollback

A staged rollout deployment is useful and safe, it consists in releasing an app gradually to a small percentage of users first, then spreading it to more users in later phases. This approach helps to detect issues early, limits the impact of bugs, and ensures stability before the update becomes public.

  • Google Play → release to a percentage of users or test groups.
  • App Store → TestFlight or release to geographic groups or small batches.

Monitoring tools:

  • Firebase Crashlytics,
  • Sentry
  • Instabug
  • Datadog.

Fast rollback:

keep the previous version ready and the ability to disable features remotely.

Pipeline mobile best practice

Automation of the release process (CI/CD) is a key practice in modern mobile development. It enables automatic building, testing, and deployment of iOS and Android apps, reducing errors and accelerating release times.

Among the most common services we recommend there are:

  • GitHub Actions: integrated CI/CD within GitHub, highly flexible. Supports Android/iOS builds with YAML workflows.
  • Bitrise: mobile-specialized CI/CD platform, featuring a visual UI and support for Flutter, React Native, Kotlin, Swift.

Among the commonly used support tools for mobile release, we have:

  • Fastlane
  • Gradle
  • Xcodebuild

Conclusions

To wrap up, we have explored mobile best practices around UI design, data management, and the release pipeline. Together, these areas provide the foundation for developing applications that are solid, modular, and maintainable throughout their entire lifecycle.

Thanks for reading!

Top comments (0)