Skip to main content

Twitter announces new open source Text Editor API for iOS developers

Twitter announced today a new “standalone, flexible” open source API for iOS developers that provides a text editor for apps, which is the same used as the basis for tweet and Fleet composer on the Twitter app for iOS.

The announcement was made today through the official Twitter blog. The company says it knows how complicated it can be to implement a simple text editor in iOS apps during the development process, so that’s why Twitter is now making its own Text Editor API available to everyone.

According to Twitter, the new Text Editor API solves common problems related to syntax highlighting and text content filtering. The company claims that Apple offers multiple text editing APIs for developers, but they can be very limited or too complicated to understand — which is something the new Twitter API aims to solve.

The high-level APIs don’t always offer enough power or control to create a truly great in-app experience. Meanwhile, the lower level APIs require a lot of knowledge about how text editing works in a variety of languages, including support for bidirectional scripts, alternative input methods (like those used for East Asian languages), and assistive technology like braille keyboards.

Developers will find robust text-attribute update logic, additional text editing events, safe event handling for text input, and support for recent versions of iOS with Twitter’s Text Editor API. It’s implemented as a Swift Package that can be easily added to an Xcode project, besides working with CocoaPods.

Twitter Text Editor encapsulates UITextView and provides familiar delegate-based APIs like many common UIKit APIs. It extends LayoutManager and TextStorage to provide custom text attributes, including attributes for presenting custom emoji. Twitter Text Editor has event schedulers to process events, providing consistent delegate callback order to your code.

https://twitter.com/TwitterOSS/status/1353778300565417985

The new open source Twitter Text Editor API can be found for free on GitHub. It works with iOS 11 or later and requires Xcode 11 or later for development.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

Author

Avatar for Filipe Espósito Filipe Espósito

Filipe Espósito is a Brazilian tech Journalist who started covering Apple news on iHelp BR with some exclusive scoops — including the reveal of the new Apple Watch Series 5 models in titanium and ceramic. He joined 9to5Mac to share even more tech news around the world.

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications