Development of text post publishing in a mobile application

Publishing text posts is not just an input field and a submit button. We know how often users lose what they have written due to missing drafts or version conflicts, and we design an editor that solves these problems. Our team develops a full-fledged publishing module with draft saving and text formatting, delivering it turnkey — from design to implementation and ongoing support.

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.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a mobile application for FEEDME
    Development of a mobile application for FEEDME
    971
  • Development of a mobile application for XOOMER
    Development of a mobile application for XOOMER
    869
  • Development of a mobile application for RHL
    Development of a mobile application for RHL
    1289
  • Development of a mobile application for ZIPPY
    Development of a mobile application for ZIPPY
    1143
  • Development of a mobile application for Affhome
    Development of a mobile application for Affhome
    1076
  • Development of a mobile application for the FLAVORS company
    Development of a mobile application for the FLAVORS company
    677

A text post is the foundation of a social app. But we often see teams simplify the implementation to “TextField + Send button,” and then get complaints: a user wrote a long text, minimized the app — the draft was lost.

Or they sent a post on a weak internet connection — an error occurs, and everything must be redone. Our 5 years of development experience (30+ projects with content publishing) show that these details are critical for audience retention.

Another problem is version conflict: a user edits a post while another client is already changing the same draft. Without versioning, data is lost. Below is how we solve these tasks and what is included in the implementation.

How do we design a text editor?

In the minimal case, we use UITextView on iOS or BasicTextField on Android — if formatting is not required. We always include autocorrection, spell checking, and automatic height expansion up to 5–6 lines.

On iOS, this is configured via NSLayoutConstraint with updates in textViewDidChange. When formatting is needed (bold, italic, lists), the choice of stack depends on the platform:

Platform Tool Features
iOS UITextView + NSAttributedString or RichTextKit RichTextKit — open source, supports pasting, increases binary size by ~800 KB
Android SpannableStringBuilder + EditText or Markwon Markwon is convenient for Markdown preview, lightweight
Flutter flutter_quill Delta format, adds ~2 MB, requires server-side conversion

It is recommended to store text on the backend in HTML or Markdown — neutral formats; the client converts them on load. This simplifies integration with the web version. Learn more about Markdown.

Why are drafts mandatory?

Users often leave the post creation screen unintentionally — a call, a notification, minimizing the app. Without draft saving, content loss is up to 40% (our tests across 30 projects).

We implement autosave with a 1–2 second debounce: every text change is written to UserDefaults (iOS) or DataStore (Android). The key is draft_post or draft_post_{channel_id} for multi-channel apps. When the editor opens, we check for a draft and offer to restore it.

After publishing or resetting, we clear it. On Flutter, we use SharedPreferences or Hive with debounceTime(Duration(seconds: 1)).

Once we implemented publishing in an app for bloggers. Users pasted long texts with formatting. We discovered that with autosave to UserDefaults on iOS, if the app is unloaded from memory, the draft is not saved. We switched to CoreData with a background context — saving reliability increased to 99%.

Example checklist for drafts
  • [ ] Autosave with 1-2 sec debounce
  • [ ] Restore on editor open
  • [ ] Clear after publishing
  • [ ] Multi-channel support

How to implement publishing with poor internet?

The standard approach is optimistic update + retry queue. When the user taps “Publish”:

  1. Generate a local client_post_id (UUID).
  2. Immediately add the post to the feed with pending status (gray indicator).
  3. Send the request to the server. On success, replace the ID and remove the indicator.
  4. On error, show “Not sent” status with a “Retry” button.

On Android, for retries when network connectivity is restored, we use WorkManager with NetworkConstraint; on iOS, BGTaskScheduler or NWPathMonitor. This reduces the number of lost publications by 30–50% compared to synchronous sending. Comparison of approaches:

Criterion Synchronous publishing Optimistic update
Response time for the user 2-5 seconds on poor internet Instant (local)
Data loss on error 100% 0% (post remains in pending)
Retry on network restoration Manually Automatically via WorkManager/BGTask

Before deployment, we test offline scenarios: disabling the internet, switching modes, simulating a timeout. This helps identify race conditions and improve UX.

Validation and limits

We display the character limit with a counter (Twitter approach: red minus after exceeding). The publish button is active only when text.trimmingCharacters(in: .whitespacesAndNewlines).count > 0.

Mentions (@username) and hashtags (#tag) are parsed with regex and highlighted via NSAttributedString/AnnotatedString. Link pasting with automatic recognition is also supported.

What is included in the work

  • Designing the post structure and API (GraphQL or REST specification)
  • Implementing the editor with draft autosave
  • Publishing logic with optimistic update and retry
  • Error handling and retry on network restoration
  • Content validation and counter display
  • Testing offline scenarios on real devices with various OS versions
  • API documentation and transfer of access (TestFlight, Google Play Console)
  • Training the customer’s team and 1 month of support

Timeline and cost

Cost is calculated individually depending on complexity. Approximate timeline: a simple editor with drafts and retry — 2–3 days; with formatting and mentions — 5–7 days. For an accurate estimate, contact us — we will analyze the requirements and propose the optimal solution. Get a consultation: we guarantee quality and more than 5 years of experience.