- #Mobile app development
How to Build a Messaging App for iOS and Android
Even though there are a number of messaging app giants in the market, such as WhatsApp, Facebook Messenger, WeChat, you can fill a specific niche. Especially if you have a great idea of building an app like WhatsApp and a deep understanding of your target audience’s needs.
WhatsApp was built on LYME/LYCE, FreeBSD OS, Erlang programming language, custom Ejabberd with Signal Protocol, Mnesia, and SQLite databases. You don’t have to copy the tech stack of your competitors; anyway, knowing their architecture may be beneficial to make the right choice for your own app.
Take into account the differences in chat app development for iOS and Android to carefully plan your resources and time of the messaging app release.
MVP covers the product’s fundamental features, so you can see if it meets your core requirements and needs of your target audience. It can be tested right then and there, so you’ll see the user feedback before plunging into the development of the full-fledged product. MVP is a great means to avoid failure.
Proceed to our article where we’ll cover all these points. We’ll talk over why it’s still feasible to develop a messaging app in 2021, uncover the tech stack of WhatsApp, discuss what architecture is better to build for your product, list potential pitfalls in the development process, and so much more. Keep on reading!
Is it a good idea to create a social media app like WhatsApp in 2021?
Main Article: How to Create a Social Media App
Let’s count the number of messaging apps on your smartphone. Probably, you’ll find at least 5 of them in constant use with such well-established leaders of the market like WhatsApp, Facebook Messenger, Instagram, and some others. However, the market is regularly shaken by the newcomers that focus on being the best for specific purposes and target audiences. Thus, Signal is famous for its military-grade encryption and security, Slack is leading in business communication, Snapchat became impressively popular with millennials at its onset. Statistics speak for themselves, so let’s see why so many entrepreneurs take on the opportunity to enter the messaging app market:
With the increased use of social media networks, people got used to typing rather than calling. For example, 75% of millennials, who have become the largest generation in the workforce, find texting more appealing than talking.
The number of people who use mobile phones is 7.1 bln in 2021, and it is predicted to reach 7.41 bln by 2024.
The number of mobile messaging app users grows worldwide every year: if it is 2.87 bln in 2021, by 2022, it is expected to amount to 3 bln.
Though the leading messaging app — WhatsApp doesn’t reveal its revenue, it was estimated the average user would bring approximately $4 to the company annually by 2020, making up the revenue of $5 bln. Facebook Messenger showed the same high-ranked figures with the revenue of $17.65 bln for Q3 2019, which was an increase of 4% compared to Q4 2018 that generated a record of $16.91 bln at that time. WeChat, the 3d number among leading messaging applications, managed to drive almost $50 bln into the Chinese economy in 2017.
So if you still have a thought: is it worth measuring swords with such monsters and getting into this sphere? The bottom line is that even though the messengers of wide applicability overwhelmed the market, it created an excellent opportunity for more niche messaging apps development: Slack, Microsoft Teams, and Flock occupied a business sector, Discord and Teamspeak divided a gaming part. But there are more fields, which thrones are empty, waiting for the coming of the new leader. Maybe the next big thing will be yours?
WhatsApp feature list
Back in the day, WhatsApp was only a messaging tool. Gaining popularity and audience, it faced more growing expectations from the public. To defend a leading position, the developers of the app had to replenish their arsenal with new features systematically. At the very beginning, WhatsApp was just a messaging tool with the essential features. Now, it can pay bills and protect accounts by fingerprint scanning.
If you want to know how to create a messaging app like WhatsApp, you need to become familiar with the list of its core features indispensable for any multi-person chat:
This feature varies depending on how clients are authorized: via the phone number or social media/email. This also affects the convenience and security of their accounts.
Simple and reliable messaging
This is a core chat feature. Sending instant messages in a chat room should be easy and convenient whether you are at the beach or in a crowded subway.
Individual and group chats
They are needed when users want to communicate in the same chat with several people.
Voice and video calls
With voice and video calls, you offer more communication opportunities for the customers.
They are necessary when the client switches from communicating to other apps or activities. Informing the user about the received message is important for the messenger’s proper usage.
Multiplatform and PC synchronization
This feature makes chat apps more flexible and convenient, which does not keep you waiting for the influx of new customers.
Sharing media files and documents
This is a standard feature for the exchange of pictures, videos, music, etc. Technically, it is done by uploading a multimedia file to an HTTP server, after which a link with content is sent.
Allows you to decrypt messages only with the help of smartphones of those users who exchanged them and thus secure communication.
Observing the increasing demands of clients and the corresponding growth of WhatsApp with the other chat apps as a whole, we recommend including in your product such complementary features if you want to fit into the messengers growing market:
Calendar and event management
This feature allows adding events into the agenda by merely holding the desired date in the chat. In WhatsApp, it is presently available only for the iPhone version.
It is going to strengthen the position of the apps in the business environment since the method of internal payment will now be as simple as GIF sharing. Such a system may work on UPI (Unified Payments Interface), so it will not be necessary to indicate the bank account number and SWIFT code. Transfer and receipt of funds are carried out to anyone from the list of contacts within 24 hours.
They will be convenient and multifunctional in any project you have. Talking about WhatsApp, it uses them for several purposes. Firstly, the app synchronizes with cloud services (Google Drive, Dropbox, Evernote). Secondly, the chat history is stored on the Google Drive server, and within a year, you can recover a lost or deleted message.
In March 2019, Facebook added a new security feature to the WhatsApp beta on Android. Owners of fingerprint-toting smartphones will be able to enter the messenger through a biometric protection system, and those who do not have this function on the device will have the opportunity to use its credentials (for example, a PIN code). Reliability in data operations is one of the most decisive things in our time, so it is worthwhile to add this feature to your mobile app along with the listed above.
Technology stack for building a messenger app
To learn how to create a chat application in Android and iOS, you need to understand what it is made of. Rick Reed, the software engineer of WhatsApp, gave many presentations about his messenger’s work. The technology stack of this app is LYME/LYCE, with one measurement: FreeBSD is used instead of Linux, since according to the developers, Linux is a real ‘beast of errors.’ Everything else is unchanged from the original build, and WhatsApp’s mobile tech stack looks like this:
According to WhatsApp’s co-founder Brian Acton, the choice of OS was explained by their excellent knowledge of the FreeBSD system and the appropriate requirements of safety and reliability.
Programming language: Erlang
Erlang is especially useful for handling a multitude of connections for multi-person chat and routing messages, exactly what the WhatsApp creators needed.
Servers: custom Ejabberd with Signal Protocol
The original XMPP (Extensible Messaging and Presence Protocol) was initially used to support both one-to-one and group chat conversations. Afterward, the developers switched to the internally developed protocol for optimizing servers and Signal Protocol for full end-to-end encryption. They also use YAWS (Yet Another Web Server) for storing multimedia data and HTML5 WebSockets that simplify two-way communication by establishing a reliable and fast connection between the server and the app.
Mnesia allows the messenger to respond to the requests more quickly and perform more efficiently, but the main advantage is that it can be reconfigured right during the run.
Offline database: SQLite
It allows deleting messages as soon as they are delivered to the local storage. The user can overwrite deleted messages with new information.
Virtual machine with customized patches: BEAM
The Mnesia database, as well as the Yaws and Ejabberd servers, are written in Erlang, so the web apps developed for LYME/LYCE can entirely run on an Erlang virtual machine with optimized server performance.
Hosting: Facebook Data Center
WhatsApp team moved from IBM servers to their own, which the company considers the most advanced on the market.
However, it is worth remembering that what suits one product may not fit the other at all. A common mistake in the chat application development process is mindless copying of competitors.
Having studied the opponent in detail, it is no longer so complicated, is it? After understanding WhatsApp’s internals, the question of how to make a chat application becomes much clearer. Still, it is possible to claim the right to a place in the sun of the messengers market, so we are moving to the main topic.
Mobile chat application development depends on the device’s operating system: to create a messenger application in Android, you need Java or Kotlin, and Swift is used to build a chat app for iOS. That is true when the application is native and you want to make a web/desktop version. Both platforms receive all the necessary tools like API, SDK, and IDE from Google and Apple. To make a chatting application in Android, this is the Java development kit, and for iOS — iOS SDK and Xcode.
Does your app need to be HIPAA compliant? Read our article about choosing HIPAA compliant chat API and SDK.
If you are thinking of how to make an Android app for chat, here is the necessary technology stack for this goal:
|Native||Programming Languages||Java Kotlin|
|UI Framework||Android UI Jetpack Compose|
To build a messaging app for iOS, you will need the following tech stack:
|UI Framework||UIKit SwiftUI|
The process of developing a mobile product on iOS and Android is not so different from a technical point of view. But there are differences in terms of complexity, design, and time. Thus, Swift requires writing less code than Android, but AppStore is much stricter and takes longer to review new products than GooglePlay. iOS design obeys the principles of limited variations in screen sizes and resolutions, while Android developers must adopt the application design for a huge list of different devices.
The tech stack and architecture of WhatsApp, like any other chatting mobile app, is not disclosed to the public. Developers do not give away this data for security purposes. But from the fragments of interviews and speeches of its developers, a more complete picture can be collected for understanding how to create a social media app like WhatsApp.
How to make a chat application like WhatsApp
The answer to how to create a chat application like WhatsApp may be the words of Rick Reed: “Being in the right place at the right time with the right product in front of the right buyer.” But nothing lasts forever, and the leadership of one is only a matter of time while the other is watching and learning from the first.
Probably you have already conducted business analysis working with some consultancy services company, maybe you have formed an idea of how to make a messaging app like WhatsApp and need to clarify it. In the last case, you can turn to a full-cycle development company to get it done. We at Aimprosoft help determine the target audience, analyze potential competitors, develop a unique value proposition, and prove the most appropriate monetization method.
Wondering how to build a messaging app like WhatsApp?
Share your idea with us, and we’ll provide you with an estimation, technical documentation, and UX prototypesTALK TO US
Special attention should be paid to a development team you hire for the project. Its choice is usually based on two main factors: skills and location. Developers’ experience in messenger creation will help avoid mistakes that have already been made by others, and location influences the cost of development services.
To make it easier to imagine how to build a messenger app, let’s divide the development into the server-side, architecture building, which includes the OS, protocol, and the frontend in case you want to develop a messaging app for the web version of the chat.
When selecting the software stack, you will not be restricted in your choice. There are enough of them: LAMP, MEAN, LAPP, etc., but it makes sense to choose the one with the technologies known to your developers better. WhatsApp uses the LYME/LYCE solution stack, the single change of which was OS modification. Custom Ejabberd allowed WhatsApp to cope with the peak loads on the server, and Erlang has become a perfect choice due to the compilation with LYME/LYCE and the ability to handle a large number of messages.
You should choose technologies by the increasing demands of speed and performance, so take the opportunity for customization when the moment comes. Ejabberd has been thoroughly overwritten and improved by WhatsApp engineers many times over the years of functioning. Accordingly, select the flexible and extensible software.
If you guess how to make a chat app and want your messenger to be on the same scale as WhatsApp, you can use the same stack. However, this will be debatable in terms of costs and feasibility. Instead of Erlang, which requires significant financial investments in social app creation and support, you can write your messenger using Node.js (like Telegram and Kik), C/C++ (Viber, WeChat), Java, Ruby, Scala, and other languages.
As for network protocols, you can use the most common XMPP from servers of your choice: OpenFire, Prosody, Matrix.org, Ejabberd, and many others. In the matter of security and reliability, MTProto and Signal Protocol stand out. If none of them suits you, you can develop your own internal protocol.
Before choosing an operating system, you need to understand how it will interact with the rest of the software. The WhatsApp team switched from Linux, the standard OS for LYME/LYCE, to open a Unix-like FreeBSD system, which for inexperienced developers could turn into disastrous difficulties. They did this not because it was a more popular solution but because they knew FreeBSD best, which demonstrates the importance of the development team knowledge when working with existing technologies. A good understanding of development tools will allow you to release the product faster and save money on a lower amount of bugs and code errors.
When determining the database, you should proceed from the company strategy: whether you are set up for a quick launch but with a plan for a further upgrade to a more reliable solution, or you are ready to sacrifice time for taming long-term software. Accordingly, many databases have their advantages and disadvantages depending on each strategy.
For example, MongoDB is one of the best in terms of fast iteration, and Cassandra demonstrates impressive scalability and automatic failover, sacrificing reading speed from time to time. Mnesia was chosen by WhatsApp engineers mainly because it is the standard for Erlang and is much easier to adapt.
Client-side development depends on the operating system of the device: for iOS, it is Swift; for Android, it is Java or Kotlin. That is true when the application is native and you want to make a web/desktop version.
If you are thinking about how to develop a messaging app like WhatsApp, pay special attention to creating an intuitive UX and aesthetically pleasing UI to attract the users. See what design we’ve made on the example of Aimchat, our product for internal communication
If everything can be clearly highlighted with the technical part of the development, then the possible obstacles are a different topic that deserves special attention.
Challenges of creating a WhatsApp type app
Even if it is impossible to avoid pitfalls during development, it is possible to minimize their number by drawing on the others’ accumulated experience and your software vendor’s problem-solving approach.
When considering how to make a chat app, take into account some common challenges, you may face:
The server overload challenge inevitably arises with a growing number of users. According to Rick Reed, WhatsApp optimization needed a tremendous effort from his development team. In this optimization example, you can understand that the server’s capacity should be chosen with a stockpile and not used at full power, leaving reserves for peak periods. If you still face the necessity of optimization, it is advisable to measure the bottlenecks, eliminate them and test it, then repeat the same sequence. When analysis and optimization are not enough for the stable server work, strengthen the hardware.
Сontinuous connection of users affects deployment on your servers. To safely deploy new code and not lose data, you must carefully configure the interaction of the servers. The server that is shutting down must transmit the real-time connection state to another server that will store published messages on all user’s channels. When the client reconnects, the server should be able to recover and show all messages that were posted in the interlocutory period.
If you want to provide high-quality services for customers so that they do not suffer from high latency, servers should be distributed throughout the territory you want to cover and be located near the user. The main difficulty arises in the development of algorithms that determine the work of secondary and tertiary servers responsible for the app operation in case of the primary server unavailability.
How to make a messaging app is the number one question, but be ready to cope with all the pitfalls during its development. Do you want to know how a dedicated team of developers can work independently, at the same time, constantly keep in touch with you for the best project outcome?
Real-time chat implementation requires a lot of work and has a high risk of synchronization failures (the app can lose consistency or become unavailable during network partitions), server logic (which includes coordination and subscription logic), and integration of database management systems with real-time updates. It is recommended to push the logic to the server, which simplifies the development process significantly.
You need to think about scaling when building the architecture of the instant messenger; otherwise, your system will crash during messages publishing in large channels. Provided that you have a single server that broadcasts messages to all customers and a channel with million subscribers, then just one posted message on a millionth channel from you will trigger the publication of a million messages which is equal to million bits of work to be done.
No matter what your hardware is, that’s an unbearable load for a server. Decide how to distribute these bits of work in real-time across the cluster, add the work to the message queue and let the users take it over.
There are many reasons for the loss of the network: from descending into the subway to switching between 3G and Wi-Fi. After the disconnection, the last client’s messages could be lost. If you want for your platform a reputation of a reliable data source, make sure that the system saves the connection state by real-time services continuously retaining and subscribes to the messages from all customers channels. In this case, when the user reconnects, the server reproduces messages lost during disconnection.
To ensure security when working with the messenger, you will need to solve a number of issues: how exactly will clients safely identify themselves? What encryption to use? The difficulty arises in developing secure user identification. To prevent masking of one user for another, be sure to use encryption in transit. In cases when significant payloads occur in real-time service, use end-to-end encryption. One way or another, your client libraries must support encryption with private keys without the possibility of sharing with real-time services.
If you are interested in how to make a chat app, knowledge of hybrid and native application particularities will form a comprehensive picture of chat development
It is possible to minimize the number of difficulties by cooperating with a dedicated development team who will think in great detail about your future product, from its architecture to future upgrades, and cope with the pitfalls standing in the way of your project success.
How much does it cost to create a chat app?
Calculating the development cost, we have taken into account the average time, which depends on the features of the project and the client requirements.
|Stages||MVP ~980—1,300 hours||Full feature set ~1,800—2,700 hours|
|Business analysis + UX||40—70||100—150|
|UI||50—70 for each platform||90—150 for each platform|
|iOS/Android development||300—350 for each platform||500—700 for each platform|
|QA||10—30 for each platform||40—60 for each platform|
If you want to know how to develop a messenger app in Android and iOS, its creation begins with business analysis, UX, and documentation, which takes from 100 hours. The specification increases this interval up to 150 hours but allows you to optimize the workflow and improve understanding with the vendor significantly.
The duration and complexity of the backend depend on technology with architecture and can reach an extended period. If you want to have a web version of the product, then the front-end, for its part, depends on the UI complexity. The simpler your online chat looks, the faster your front-end developers will do their job. The development of iOS/Android versions entirely hinges on the experience of developers. QA lasts the least of all stages: within 60 hours for every platform.
Based on the development hours, let’s find out how much it will cost to make a WhatsApp-like app.
The MVP messenger is almost a working product since all the essential features for the chatting are already there:
- push notifications;
- multimedia files transmission;
To create an instant messaging app with such a set of features, you will need the following specialists:
- 1 Project Manager;
- 1 UI/UX designer;
- 1 Tech Lead;
- 2 Backend developers;
- 1 iOS developer;
- 1 Android developer;
- 1 QA engineer.
As a result, the MVP messenger development lasts approximately from 980 to 1,300 hours, excluding the web version.
Want to know how to make a chat application MVP and get a detailed analysis for your product?
We are always ready to help you!TALK TO US
Full feature set
In fact, the finished social media app may not differ much from the MVP: it can be just a working app for negotiations, simple and no-frills. But in order to meet the necessary quality standards, additional functions have to be added, such as end-to-end encryption and voice/video calls.
Despite the insignificant differences from the MVP in terms of base work, a messenger with the full feature set has some particularities aimed at improving the user-friendliness, security, and UX:
- end-to-end encryption;
- voice and video calls;
- contact sharing;
- location tracking;
- self-destructing messages;
- chat history and backup;
- synchronization between devices;
- offline support.
These features are taken for granted, so the absence of at least one of them may adversely affect the user experience.
The full picture of the messaging app development looks like this:
|Country||Average hourly rate||MVP ~980—1,300 hours||Full feature set ~1,800—2,700 hours|
|Western Europe (Germany)||$65||$63,700—84,500||$117,000—175,500|
|Eastern Europe (Ukraine)||$35||$34,300—45,500||$63,000—94,500|
If you want to create a live chat app with full-scale and unique functionality, it will take much more time at all stages of development and will require a large team of specialists. A project of this scope will require from 1,800+ hours to develop since such features as self-destructing messages, chatbots implementation, in-depth research, and a host of others will be needed.
Therefore, the most costly location for chat application development is the USA, with a minimum of $144,000 for a full feature set product. The cheapest development without a drop in quality can be found in Eastern Europe (for example, Ukraine), amounting to a minimum of $63,000. It is worth mentioning that the price bar approaches the highest indicator depending on your requirements for functionality.
How do chat apps make money
The stakes are high when you decide what monetization model you’ll use to make money with your app. Many of them have already been probed by your predecessors. Still, the competition is tough, and they are trying to differentiate. Let’s browse through the most popular monetization models that showed their output in practice and see how they work, what their drawbacks are, and decide which of them are the most applicable for your purposes.
The sizable advantage is you can choose the most prolific advertising platform or provider to deal with. However, it works well for live messaging apps with a massive user base. So it would be harder to reap great revenues for niche apps as they have a really narrow user base with certain interests, and the ads may look rather intrusive to them.
Who applies it? Facebook Messenger.
Incredibly prolific channel of income because emotions rule humans and help people express themselves. You can sell your own stickers and engage brands and celebrities to sell stickers on their platforms, which raises your revenue. LINE went even further and earned a hatful of money by introducing such innovation as “Creator’s market,” which let anyone who can design stickers submit them to the platform and get paid 50-50 from the revenue LINE received via stickers purchases.
Who applies it? LINE, KakaoTalk.
You can make your accounts payable: let the account badge appear in searches within the app and offer expanded features for accounts. With this monetization model, you allow brands and celebrities to share their content for attracting new fans, send them push notifications, and redirect them to a website or e-commerce. At the same time, you won’t spam your users with ads; on the opposite, they will receive promoted messages from brands they opt to follow.
Who applies it? WeChat, KakaoTalk, LINE.
Lies in providing access to some content for using in the app on a paid basis. You can sell virtual or physical goods within your app, so in-app purchases can include consumer goods such as clothes and accessories. It can also include virtual goods like credits to enhance your visibility in the app, gain new ways to communicate with people, buy extra lives or in-game currency.
It is worth saying that developing and linking up games to your social messaging app’s networks is a great source of in-app purchases and raised income. For example, KakaoTalk revealed revenue of over $100 mln in Q1 2020 from its gaming platform.
Who applies it? KakaoTalk, LINE, WeChat, Tango, Kik.
When you charge a monthly fee for using your app or any specific app’s service, it ensures a stable source of income being rather predictable. The trick is — propose a user-free trial for a week or a month, then give your audience access to your app’s features through Role-based access control. WhatsApp successfully applied this model by charging $0.99 per year; however, it can be rather difficult to follow in its footsteps for a less well-known app.
Who applies it? WhatsApp.
A typical example of content merchandising is how LINE has been selling its characters. There are LINE Friends stores in the USA, Japan, Taiwan, and Korea where you can buy mugs, toys, notebooks with its admired characters. LINE Friends are so popular that 2 manga and a 30-minute TV series were created featuring them. The outcome? Multiplied revenue for LINE Corporation.
Who applies it? LINE.
Enables your users to transact payments within the mobile live chat application to any 3d party under a multi-layered secure environment. The transactions can be made between customers and companies and between individuals themselves. It’s implemented by linking bank accounts with phone numbers verified by a UPI (unique personal identification) PIN. Payments are great sources for your chat app’s revenue generation.
What problem you may encounter is how to cope with the increasing volume of transactions and, most vital — ensure the security of financial exchanges. Some messaging apps’ giants even create their own digital currency (cryptocurrency) in pursuit of taking control of money transfer that would leave banks behind and let them win the trust of their users.
Who applies it? Facebook Messenger, WeChat, Telegram, LINE, WhatsApp.
A new startup usually doesn’t have proven value to its users. Given the avalanche of free real-time messaging apps presented on Google Play and Apple Store, it’s advisable to avoid the pay-per-download monetization model. Be prepared it takes some time to find out what works best for your app. And as we see from the examples of messaging apps above, it’s beneficial to mix different models to get several sources of income.
Success favors the brave. The messenger market still has a lot of unrealized ideas and unfairly overlooked sectors. The advantage of the investor is expressed in the fact that there is much informational support in the form of developer diaries and presentations from WhatsApp, Facebook Messenger, Telegram, and many others, which makes it possible not to repeat common mistakes and use already proven solutions.
If you have an idea for a chat application development and you lack only an experienced team for its implementation, then you are in the right place. Aimprosoft mobile team has all the necessary experience to make an app like WhatsApp from scratch and implement your most ambitious plans. Be sure to contact us and discuss all the details.
Frequently Asked Questions
What are the essential features of an app like WhatsApp?
- push notifications;
- multimedia files transmission;