Mobile App Development vs Web/Backend: Lessons from Production Releases

Mobile app development is different from typical web or backend development. There, you change your code, deploy within minutes, and boom—your code is in production.

Hm, however, in mobile, you can't think like that. After releasing the app to production, it will be reviewed by Store Vendors (e.g., App Store, Play Store), which usually takes 1–5 business days. Then, new users will see the app live in stores.

Over time, you will add features and release new versions of the app. Unlike web or backend, users will not always be using the latest version of the app. Some users will have new features, some will not. You should always think about compatibility.

For example, if the backend was returning the "name" field in some API JSON response in app V1, and in app V2 the backend started sending this field as "fullName", Crashlytics starts panicking—old versions of your app become unusable with such a small mistake.

According to such cases in mobile development, and based on my experience, I would suggest making sure the following are handled before deploying your mobile app to production:

1. Force Update

You should be able to force your users to update the app in some cases. For example, you made some of your app's content premium, and you do not want that content to stay free in older versions. If you do not have a force-update feature, you cannot tell every user of your app to update to the latest version.

2. Flexible Update

From my experience, users are often too lazy to update the app. If the Play Store or App Store updates the app automatically, that's great! But I have seen some users still using the initial version of the app even if it was released 2–3 years ago.

3. Feature Flags

You should be able to turn on or off newly added features remotely. After adding a new feature, there are some risks within the app. The feature code might be unstable on some end devices (highly likely in Android), or the users might not like the feature that was recently added. In those scenarios, you usually might republish the app. But it takes time for the app to be updated on all users' devices. Feature flags help you turn off unwanted features or code causing crashes immediately.

4. Error Handling

Ideally, you should get error messages from the backend. For example, you have an API to create a new order (let's say in an e-commerce platform). In V1 of the app, you stored predefined error messages within the app.

For example, you say:

  • if error code is 410 → shop is closed
  • if error code is 411 → shop is outside of working hours
  • if error code is 413 → delivery not available

Hm, after a few months, in V2 of your app, you want to add a new error:

  • if error code is 417 → user is blocked

But you can't represent the proper error message to V1 users of your app—they will see generic or meaningless error messages.

what i recommend is that you should add "error_message" in your json response. Based on user's language prefs, you can send proper error messages.

5. Managed Releases

Most platforms have this feature. The idea is that you should not release the app to 100% of users immediately. If any crash happens, it is harder to revert. Instead, you should release the app gradually: 1%, then 5%, then 50%, then 100%. With this, you can catch potential crashes earlier without affecting all of your users.

6. Analytics

You should add analytics to your app. And, you should be able to monitor the crashes, stability of the app all the time. There are popular SDKs for this like Firebase Analytics

7. Push notifications

You should properly configure push notifications. It is not hard these days with SDKs like FCM. Also, make sure you join to proper FCM topics when needed. For example, in one of our app, we wanted to send certain group of people in our app from the backend side, but we could not. If we had subscribed to certain fcm topics beforehand we could do it easily.

8. CPU architectures and Backward Compatibility

Always test your app in older OS versions. App that is smoothly working in Android 15 might not work as expected in Android 8 or 9. It is because of API changes or deprecated usage of APIs. So, safest option is to test your app against different versions of OS.

Android devices usually have different CPU architectures. For example: arm64, armv7, x86_64, x86 etc. If you are using some libraries with CPP libraries, make sure it contains architecture cpp codes for all architecture types. Otherwise, you will start getting crashes like "UnsatisfiedLinkError". I remember one crash affecting many users alerted me at midnight, and had to fix that.

9. API keys security

Make sure you do not store sensitive API keys within the code. If you do some, an app can be easily decompiled, and API key might be stolen.

I remember, when I work at one delivery company, our Google Directions API usage spiked. It turned out that we were storing api keys in mobile apps and in website also. As a solution, we moved the API keys to Firebase Remote config. It is also not 100 % safe, because attacker can still stole the API key using 'The Man In The Middle' attack. However, with Firebase Remote config, we could easily invalidate stolen key and replace with a new one.

Safest option for API keys is using your backend as a storage, and restricting API key usage to your backend IP address only, and using your server as proxy to APIs. For the above case, our CEO did not want our server to be a bottleneck for Google Directions, and we ended up using Firebase Remote Config.